mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-05 12:50:29 +02:00
16 lines
306 B
JavaScript
16 lines
306 B
JavaScript
|
const markdownUtils = {
|
||
|
|
||
|
// Not really escaping because that's not supported by marked.js
|
||
|
escapeLinkText(text) {
|
||
|
return text.replace(/(\[|\]|\(|\))/g, '_');
|
||
|
},
|
||
|
|
||
|
escapeLinkUrl(url) {
|
||
|
url = url.replace(/\(/g, '%28');
|
||
|
url = url.replace(/\)/g, '%29');
|
||
|
return url;
|
||
|
},
|
||
|
|
||
|
};
|
||
|
|
||
|
export { markdownUtils };
|