From 90bc84c010a78b04a919b2aad24c2ec8e1a11427 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 12 Oct 2019 19:36:06 +0200 Subject: [PATCH] Clipper: Fixed: Some tables were imported with a duplicate header --- CliClient/package-lock.json | 6 +-- CliClient/package.json | 2 +- CliClient/tests/HtmlToMd.js | 2 +- .../tests/html_to_md/table_with_header.html | 14 +++++++ .../tests/html_to_md/table_with_header.md | 3 ++ ElectronClient/app/package-lock.json | 6 +-- ElectronClient/app/package.json | 2 +- ReactNativeClient/package-lock.json | 41 +++++-------------- 8 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 CliClient/tests/html_to_md/table_with_header.html create mode 100644 CliClient/tests/html_to_md/table_with_header.md diff --git a/CliClient/package-lock.json b/CliClient/package-lock.json index 3cc782cba..299586461 100644 --- a/CliClient/package-lock.json +++ b/CliClient/package-lock.json @@ -1564,9 +1564,9 @@ } }, "joplin-turndown-plugin-gfm": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/joplin-turndown-plugin-gfm/-/joplin-turndown-plugin-gfm-1.0.9.tgz", - "integrity": "sha512-SOa/Uiy3nyoBGtHqFe+TBg10UTIOzzcUUzNhx2MyR4Z0vbKL3enGggGypig1t7G5uHwv5j+NhooRuM619Zk0bw==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/joplin-turndown-plugin-gfm/-/joplin-turndown-plugin-gfm-1.0.11.tgz", + "integrity": "sha512-S2I+VCTqIhpWKKkPHsyJ5rdll9H/JjMXoBVClRX1TnphcmrSxufevdoXWWVgLncdXpSSiuoifCXgFZy3ueVElg==" }, "jpeg-js": { "version": "0.1.2", diff --git a/CliClient/package.json b/CliClient/package.json index 1b6cd5bf0..252a471bd 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -45,7 +45,7 @@ "image-data-uri": "^2.0.0", "image-type": "^3.0.0", "joplin-turndown": "^4.0.18", - "joplin-turndown-plugin-gfm": "^1.0.9", + "joplin-turndown-plugin-gfm": "^1.0.11", "jssha": "^2.3.0", "levenshtein": "^1.0.5", "markdown-it": "^8.4.2", diff --git a/CliClient/tests/HtmlToMd.js b/CliClient/tests/HtmlToMd.js index 4fa06ac77..baba195c1 100644 --- a/CliClient/tests/HtmlToMd.js +++ b/CliClient/tests/HtmlToMd.js @@ -39,7 +39,7 @@ describe('HtmlToMd', function() { const htmlPath = `${basePath}/${htmlFilename}`; const mdPath = `${basePath}/${filename(htmlFilename)}.md`; - // if (htmlFilename !== 'anchor_local.html') continue; + // if (htmlFilename !== 'table_with_header.html') continue; const htmlToMdOptions = {}; diff --git a/CliClient/tests/html_to_md/table_with_header.html b/CliClient/tests/html_to_md/table_with_header.html new file mode 100644 index 000000000..eb4355533 --- /dev/null +++ b/CliClient/tests/html_to_md/table_with_header.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +
AB
cd
\ No newline at end of file diff --git a/CliClient/tests/html_to_md/table_with_header.md b/CliClient/tests/html_to_md/table_with_header.md new file mode 100644 index 000000000..18a8a6499 --- /dev/null +++ b/CliClient/tests/html_to_md/table_with_header.md @@ -0,0 +1,3 @@ +| A | B | +| --- | --- | +| c | d | \ No newline at end of file diff --git a/ElectronClient/app/package-lock.json b/ElectronClient/app/package-lock.json index 2c45afc04..3ea0e1d4c 100644 --- a/ElectronClient/app/package-lock.json +++ b/ElectronClient/app/package-lock.json @@ -4029,9 +4029,9 @@ } }, "joplin-turndown-plugin-gfm": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/joplin-turndown-plugin-gfm/-/joplin-turndown-plugin-gfm-1.0.9.tgz", - "integrity": "sha512-SOa/Uiy3nyoBGtHqFe+TBg10UTIOzzcUUzNhx2MyR4Z0vbKL3enGggGypig1t7G5uHwv5j+NhooRuM619Zk0bw==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/joplin-turndown-plugin-gfm/-/joplin-turndown-plugin-gfm-1.0.11.tgz", + "integrity": "sha512-S2I+VCTqIhpWKKkPHsyJ5rdll9H/JjMXoBVClRX1TnphcmrSxufevdoXWWVgLncdXpSSiuoifCXgFZy3ueVElg==" }, "js-tokens": { "version": "3.0.2", diff --git a/ElectronClient/app/package.json b/ElectronClient/app/package.json index f545318b4..4aae8cb98 100644 --- a/ElectronClient/app/package.json +++ b/ElectronClient/app/package.json @@ -105,7 +105,7 @@ "html-minifier": "^4.0.0", "image-type": "^3.0.0", "joplin-turndown": "^4.0.18", - "joplin-turndown-plugin-gfm": "^1.0.9", + "joplin-turndown-plugin-gfm": "^1.0.11", "jssha": "^2.3.1", "katex": "^0.10.0", "levenshtein": "^1.0.5", diff --git a/ReactNativeClient/package-lock.json b/ReactNativeClient/package-lock.json index 7c92238e1..e9e594103 100644 --- a/ReactNativeClient/package-lock.json +++ b/ReactNativeClient/package-lock.json @@ -2763,8 +2763,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -2782,13 +2781,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2801,18 +2798,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -2915,8 +2909,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -2926,7 +2919,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2939,20 +2931,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2969,7 +2958,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -3042,8 +3030,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -3053,7 +3040,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -3129,8 +3115,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -3160,7 +3145,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3178,7 +3162,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3217,13 +3200,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.3", - "bundled": true, - "optional": true + "bundled": true } } },