1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Desktop: Improved GotoAnything speed and made it safer

Previously we'd use the remove-markdown package to create the note
preview however this function would freeze on certain notes, and was
probably unsafe as it used regex to parse Markdown. Replaced this in
favour of Markdown-it along with htmlparser2 to strip all markup from a
note.
This commit is contained in:
Laurent Cozic
2020-07-14 23:27:12 +01:00
parent 7f1c25793a
commit 657cebfda9
19 changed files with 147 additions and 79 deletions

View File

@ -123,7 +123,7 @@ utils.resourceStatus = function(ResourceModel, resourceInfo) {
};
utils.imageReplacement = function(ResourceModel, src, resources, resourceBaseUrl) {
if (!ResourceModel) return null;
if (!ResourceModel || !resources) return null;
if (!ResourceModel.isResourceUrl(src)) return null;