You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-14 23:26:58 +02:00
Desktop: Resolves #3333: Improved escaping of Markdown titles in links
This commit is contained in:
@@ -9,11 +9,6 @@ const listRegex = /^(\s*)([*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/;
|
||||
const emptyListRegex = /^(\s*)([*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/;
|
||||
|
||||
const markdownUtils = {
|
||||
// Not really escaping because that's not supported by marked.js
|
||||
escapeLinkText(text) {
|
||||
return text.replace(/(\[|\]|\(|\))/g, '_');
|
||||
},
|
||||
|
||||
// Titles for markdown links only need escaping for [ and ]
|
||||
escapeTitleText(text) {
|
||||
return text.replace(/(\[|\])/g, '\\$1');
|
||||
|
||||
Reference in New Issue
Block a user