Skip to content

Commit

Permalink
Add preference to customize block id
Browse files Browse the repository at this point in the history
Fixes #87
  • Loading branch information
argenos committed Apr 11, 2021
1 parent a7a8f3a commit a74b07a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/mdnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ function noteToMarkdown(item) {
noteMD.mdnotesFileName = getMDNoteFileName(parentItem);
noteMD.metadataFileName = getZMetadataFileName(parentItem);
if (getPref("obsidian.blocks")) {
noteMD.noteContent = Zotero.MarkdownUtils.addBlockIds(noteMD.noteContent, noteMD.mdnotesFileName);
let citekey = '';
if (citekey !== "undefined" && getPref("obsidian.blocks.use_citekey")) {
citekey = getCiteKey(parentItem);
}
noteMD.noteContent = Zotero.MarkdownUtils.addBlockIds(noteMD.noteContent, citekey);
}

return noteMD;
Expand Down
1 change: 1 addition & 0 deletions defaults/preferences/mdnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ pref("extensions.mdnotes.html2md.rules.underline.close", "\n\n");
pref("extensions.mdnotes.obsidian.vault", "");
pref("extensions.mdnotes.obsidian.attach_obsidian_uri", false);
pref("extensions.mdnotes.obsidian.blocks", false);
pref("extensions.mdnotes.obsidian.blocks.use_citekey", false);

0 comments on commit a74b07a

Please sign in to comment.