1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Desktop, CLI: Fixes #1723: Import Evernote audio files correctly

This commit is contained in:
Laurent Cozic 2019-07-13 17:26:47 +01:00
parent f7203ed7e2
commit fa69957d3f
3 changed files with 9 additions and 7 deletions

View File

@ -321,16 +321,18 @@ function tagAttributeToMdText(attr) {
function addResourceTag(lines, resource, alt = "") {
// Note: refactor to use Resource.markdownTag
let tagAlt = alt == "" ? resource.alt : alt;
if (!tagAlt) tagAlt = '';
tagAlt = tagAttributeToMdText(tagAlt);
if (!alt) alt = resource.title;
if (!alt) alt = resource.filename;
if (!alt) alt = '';
alt = tagAttributeToMdText(alt);
if (isImageMimeType(resource.mime)) {
lines.push("![");
lines.push(tagAlt);
lines.push(alt);
lines.push("](:/" + resource.id + ")");
} else {
lines.push("[");
lines.push(tagAlt);
lines.push(alt);
lines.push("](:/" + resource.id + ")");
}

File diff suppressed because one or more lines are too long

View File

@ -129,7 +129,7 @@ class InteropService {
for (let i = 0; i < modules.length; i++) {
const m = modules[i];
if (type !== m.type) continue;
if (m.fileExtensions.indexOf(ext) >= 0) return m;
if (m.fileExtensions && m.fileExtensions.indexOf(ext) >= 0) return m;
}
return null;