mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 20:49:01 +01:00
refactor(export/markdown): use let instead of var
This commit is contained in:
parent
79fa2a2200
commit
da42ddeee7
@ -162,9 +162,9 @@ function buildInlineLinkFilter(): Rule {
|
|||||||
return {
|
return {
|
||||||
filter: function (node, options) {
|
filter: function (node, options) {
|
||||||
return (
|
return (
|
||||||
options.linkStyle === 'inlined' &&
|
options.linkStyle === 'inlined' &&
|
||||||
node.nodeName === 'A' &&
|
node.nodeName === 'A' &&
|
||||||
!!node.getAttribute('href')
|
!!node.getAttribute('href')
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -178,9 +178,9 @@ function buildInlineLinkFilter(): Rule {
|
|||||||
|
|
||||||
// Otherwise treat as normal.
|
// Otherwise treat as normal.
|
||||||
// TODO: Call super() somehow instead of duplicating the implementation.
|
// 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')
|
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, '\\"') + '"'
|
if (title) title = ' "' + title.replace(/"/g, '\\"') + '"'
|
||||||
return '[' + content + '](' + href + title + ')'
|
return '[' + content + '](' + href + title + ')'
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user