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

Clipper: Fixes #1462: Allow importing images from local file with file:// URLs

This commit is contained in:
Laurent Cozic
2019-05-10 01:06:06 +01:00
parent 356f8e580b
commit 771975cd35
5 changed files with 39 additions and 47 deletions

View File

@ -1,6 +1,7 @@
const stringPadding = require('string-padding');
const urlUtils = require('lib/urlUtils');
const MarkdownIt = require('markdown-it');
const setupLinkify = require('lib/MdToHtml/setupLinkify');
const markdownUtils = {
@ -23,6 +24,8 @@ const markdownUtils = {
extractImageUrls(md) {
const markdownIt = new MarkdownIt();
setupLinkify(markdownIt); // Necessary to support file:/// links
const env = {};
const tokens = markdownIt.parse(md, env);
const output = [];