1
0
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:
Laurent Cozic 2021-02-05 16:51:37 +00:00
parent 1e8f1cd5c5
commit 127a28e9b0
5 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1 @@
<pre><code>one block</code></pre><pre><code>two block</code></pre>

View File

@ -0,0 +1,7 @@
```
one block
```
```
two block
```

View File

@ -0,0 +1,8 @@
<div class="joplin-editable">
<pre class="joplin-source" data-joplin-language="js" data-joplin-source-open="&#96;&#96;&#96;js&#10;" data-joplin-source-close="&#10;&#96;&#96;&#96;">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="&#96;&#96;&#96;&#10;" data-joplin-source-close="&#10;&#96;&#96;&#96;">test</pre>
<pre class="hljs"><code><span class="hljs-built_in">test</span></code></pre>
</div>

View File

@ -0,0 +1,7 @@
```js
var a = 1;
```
```
test
```

View File

@ -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';
}
}