Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(export/markdown): use let instead of var
Elian Doranda42ddeee7e8
diff --git a/src/services/export/markdown.ts b/src/services/export/markdown.tsindex c148b9e2ef..0bed882f9d 100644--- a/src/services/export/markdown.ts+++ b/src/services/export/markdown.ts@@ -162,9 +162,9 @@ function buildInlineLinkFilter(): Rule {return {filter: function (node, options) {return (- options.linkStyle === 'inlined' &&- node.nodeName === 'A' &&- !!node.getAttribute('href')+ options.linkStyle === 'inlined' &&+ node.nodeName === 'A' &&+ !!node.getAttribute('href'))},@@ -178,9 +178,9 @@ function buildInlineLinkFilter(): Rule {// Otherwise treat as normal.// TODO: Call super() somehow instead of duplicating the implementation.- var href = node.getAttribute('href')+ let href = node.getAttribute('href')if (href) href = href.replace(/([()])/g, '\\$1')- var title = cleanAttribute(node.getAttribute('title'))+ let title = cleanAttribute(node.getAttribute('title'))if (title) title = ' "' + title.replace(/"/g, '\\"') + '"'return '[' + content + '](' + href + title + ')'}