You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
* Updated commit * Update package.json * Update package.json Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ const stringPadding = require('string-padding');
|
||||
const urlUtils = require('lib/urlUtils');
|
||||
const MarkdownIt = require('markdown-it');
|
||||
const { setupLinkify } = require('lib/joplin-renderer');
|
||||
const removeMarkdown = require('remove-markdown');
|
||||
|
||||
const markdownUtils = {
|
||||
// Not really escaping because that's not supported by marked.js
|
||||
@@ -101,6 +102,11 @@ const markdownUtils = {
|
||||
const title = lines[0].trim();
|
||||
return title.replace(filterRegex, '').replace(mdLinkRegex, '$1').replace(emptyMdLinkRegex, '$1').substring(0,80);
|
||||
},
|
||||
|
||||
stripMarkdown(text, options = { gfm: false }) {
|
||||
// Removes Markdown syntax elements from the given text
|
||||
return removeMarkdown(text, options);
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = markdownUtils;
|
||||
|
||||
Reference in New Issue
Block a user