mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-01 19:15:01 +02:00
HtmlToMd: Minor tweak on LI tag
This commit is contained in:
parent
3c95979d94
commit
658b911513
@ -34,7 +34,7 @@ describe('HtmlToMd', function() {
|
||||
const htmlPath = basePath + '/' + htmlFilename;
|
||||
const mdPath = basePath + '/' + filename(htmlFilename) + '.md';
|
||||
|
||||
// if (htmlFilename !== 'list4.html') continue;
|
||||
// if (htmlFilename !== 'code2.html') continue;
|
||||
|
||||
const html = await shim.fsDriver().readFile(htmlPath);
|
||||
const expectedMd = await shim.fsDriver().readFile(mdPath);
|
||||
|
7
CliClient/tests/html_to_md/code2.html
Normal file
7
CliClient/tests/html_to_md/code2.html
Normal file
@ -0,0 +1,7 @@
|
||||
<p>Subshell:</p>
|
||||
<pre><code>(
|
||||
set -e
|
||||
false
|
||||
echo Unreachable
|
||||
) && echo Great success
|
||||
</code></pre>
|
7
CliClient/tests/html_to_md/code2.md
Normal file
7
CliClient/tests/html_to_md/code2.md
Normal file
@ -0,0 +1,7 @@
|
||||
Subshell:
|
||||
|
||||
(
|
||||
set -e
|
||||
false
|
||||
echo Unreachable
|
||||
) && echo Great success
|
4
CliClient/tests/html_to_md/text2.html
Normal file
4
CliClient/tests/html_to_md/text2.html
Normal file
@ -0,0 +1,4 @@
|
||||
<span>One line</span>
|
||||
<span>Two lines</span>
|
||||
|
||||
<span>all</span><span>attached</span>
|
4
CliClient/tests/html_to_md/text2.md
Normal file
4
CliClient/tests/html_to_md/text2.md
Normal file
@ -0,0 +1,4 @@
|
||||
One line
|
||||
Two lines
|
||||
|
||||
allattached
|
@ -910,6 +910,7 @@ function enexXmlToMdArray(stream, resources, options = {}) {
|
||||
} else if (isCodeTag(n, nodeAttributes)) {
|
||||
section.lines.push(BLOCK_OPEN);
|
||||
state.inCode = true;
|
||||
if (n === 'pre') state.inPre = true;
|
||||
} else if (n == "br") {
|
||||
section.lines.push(NEWLINE);
|
||||
} else if (n == "en-media") {
|
||||
@ -1062,7 +1063,7 @@ function enexXmlToMdArray(stream, resources, options = {}) {
|
||||
for (let i = section.lines.length - 1; i >= 0; i--) {
|
||||
const line = section.lines[i];
|
||||
if ([BLOCK_OPEN, BLOCK_CLOSE, NEWLINE, NEWLINE_MERGED, SPACE].indexOf(line) >= 0 || !line) {
|
||||
section.lines.splice(i, 1);
|
||||
section.lines[i] = ' ';
|
||||
} else if (line === '- ') {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user