mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-26 21:12:59 +02:00
Desktop: Fixes #4416: Fixed formatting of consecutive code blocks
This commit is contained in:
parent
1e8f1cd5c5
commit
127a28e9b0
1
packages/app-cli/tests/html_to_md/code_4.html
Normal file
1
packages/app-cli/tests/html_to_md/code_4.html
Normal file
@ -0,0 +1 @@
|
||||
<pre><code>one block</code></pre><pre><code>two block</code></pre>
|
7
packages/app-cli/tests/html_to_md/code_4.md
Normal file
7
packages/app-cli/tests/html_to_md/code_4.md
Normal file
@ -0,0 +1,7 @@
|
||||
```
|
||||
one block
|
||||
```
|
||||
|
||||
```
|
||||
two block
|
||||
```
|
8
packages/app-cli/tests/html_to_md/code_5.html
Normal file
8
packages/app-cli/tests/html_to_md/code_5.html
Normal file
@ -0,0 +1,8 @@
|
||||
<div class="joplin-editable">
|
||||
<pre class="joplin-source" data-joplin-language="js" data-joplin-source-open="```js " data-joplin-source-close=" ```">var a = 1;</pre>
|
||||
<pre class="hljs"><code><span class="hljs-keyword">var</span> a = <span class="hljs-number">1</span>;</code></pre>
|
||||
</div>
|
||||
<div class="joplin-editable">
|
||||
<pre class="joplin-source" data-joplin-language="" data-joplin-source-open="``` " data-joplin-source-close=" ```">test</pre>
|
||||
<pre class="hljs"><code><span class="hljs-built_in">test</span></code></pre>
|
||||
</div>
|
7
packages/app-cli/tests/html_to_md/code_5.md
Normal file
7
packages/app-cli/tests/html_to_md/code_5.md
Normal file
@ -0,0 +1,7 @@
|
||||
```js
|
||||
var a = 1;
|
||||
```
|
||||
|
||||
```
|
||||
test
|
||||
```
|
@ -591,7 +591,7 @@ rules.joplinSourceBlock = {
|
||||
const info = joplinEditableBlockInfo(node);
|
||||
if (!info) return;
|
||||
|
||||
return info.openCharacters + info.content + info.closeCharacters;
|
||||
return '\n\n' + info.openCharacters + info.content + info.closeCharacters + '\n\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user