Make prismjs shortcode CRLF tolerant
Checks for extra line in the form of `\r\n` or `\n` so that it's recognized and removed appropriately when edited in a CRLF editor
This commit is contained in:
parent
ca1cc0c391
commit
9fcd6f2e83
@ -1,4 +1,4 @@
|
|||||||
{{ $inner := replaceRE "^\n" "" .Inner | string }}
|
{{ $inner := replaceRE "^\r?\n" "" .Inner | string }}
|
||||||
{{ if len .Params | eq 0 }}
|
{{ if len .Params | eq 0 }}
|
||||||
<pre><code>{{ $inner }}</code></pre>
|
<pre><code>{{ $inner }}</code></pre>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
Loading…
Reference in New Issue
Block a user