closing fence should not be indented more than 3 spaces
@ -55,6 +55,11 @@ module.exports = function fences(state, startLine, endLine, silent) {
if (state.src.charCodeAt(pos) !== marker) { continue; }
if (state.tShift[nextLine] - state.blkIndent >= 4) {
// closing fence should be indented less than 4 spaces
continue;
}
pos = state.skipChars(pos, marker);
// closing code fence must be at least as long as the opening one
@ -32,25 +32,6 @@ error:
<h1>foo #</h1>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src line: 1335
.
```
aaa
<pre><code>aaa
</code></pre>
error:
src line: 3124
@ -1060,6 +1060,19 @@ aaa
src line: 1348