mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 09:46:25 +08:00
don't convert MD to HTML if "import markdown as text" is not selected, closes #733
This commit is contained in:
parent
5de92171a7
commit
bfc7570e14
1 changed files with 2 additions and 1 deletions
|
@ -258,7 +258,8 @@ async function importTar(taskContext, fileBuffer, importRootNote) {
|
|||
content = content.toString("UTF-8");
|
||||
}
|
||||
|
||||
if ((noteMeta && noteMeta.format === 'markdown') || (!noteMeta && ['text/markdown', 'text/x-markdown'].includes(mime))) {
|
||||
if ((noteMeta && noteMeta.format === 'markdown')
|
||||
|| (!noteMeta && taskContext.data.textImportedAsText && ['text/markdown', 'text/x-markdown'].includes(mime))) {
|
||||
const parsed = mdReader.parse(content);
|
||||
content = mdWriter.render(parsed);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue