You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
Revert "Desktop: Add ENEX to HTML export (#1795)"
This reverts commit 2f14832c34.
Reverting PR #1795 due to broken MD import and other issues
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const stringPadding = require('string-padding');
|
||||
const stringToStream = require('string-to-stream');
|
||||
const resourceUtils = require('lib/resourceUtils.js');
|
||||
|
||||
const BLOCK_OPEN = '[[BLOCK_OPEN]]';
|
||||
const BLOCK_CLOSE = '[[BLOCK_CLOSE]]';
|
||||
@@ -296,6 +295,12 @@ function collapseWhiteSpaceAndAppend(lines, state, text) {
|
||||
return lines;
|
||||
}
|
||||
|
||||
const imageMimeTypes = ['image/cgm', 'image/fits', 'image/g3fax', 'image/gif', 'image/ief', 'image/jp2', 'image/jpeg', 'image/jpm', 'image/jpx', 'image/naplps', 'image/png', 'image/prs.btif', 'image/prs.pti', 'image/t38', 'image/tiff', 'image/tiff-fx', 'image/vnd.adobe.photoshop', 'image/vnd.cns.inf2', 'image/vnd.djvu', 'image/vnd.dwg', 'image/vnd.dxf', 'image/vnd.fastbidsheet', 'image/vnd.fpx', 'image/vnd.fst', 'image/vnd.fujixerox.edmics-mmr', 'image/vnd.fujixerox.edmics-rlc', 'image/vnd.globalgraphics.pgb', 'image/vnd.microsoft.icon', 'image/vnd.mix', 'image/vnd.ms-modi', 'image/vnd.net-fpx', 'image/vnd.sealed.png', 'image/vnd.sealedmedia.softseal.gif', 'image/vnd.sealedmedia.softseal.jpg', 'image/vnd.svf', 'image/vnd.wap.wbmp', 'image/vnd.xiff'];
|
||||
|
||||
function isImageMimeType(m) {
|
||||
return imageMimeTypes.indexOf(m) >= 0;
|
||||
}
|
||||
|
||||
function tagAttributeToMdText(attr) {
|
||||
// HTML attributes may contain newlines so remove them.
|
||||
// https://github.com/laurent22/joplin/issues/1583
|
||||
@@ -313,7 +318,7 @@ function addResourceTag(lines, resource, alt = '') {
|
||||
if (!alt) alt = '';
|
||||
|
||||
alt = tagAttributeToMdText(alt);
|
||||
if (resourceUtils.isImageMimeType(resource.mime)) {
|
||||
if (isImageMimeType(resource.mime)) {
|
||||
lines.push('`);
|
||||
|
||||
Reference in New Issue
Block a user