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:
parent
f7203ed7e2
commit
fa69957d3f
@ -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
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user