mirror of
https://github.com/panr/hugo-theme-terminal.git
synced 2024-11-29 06:58:45 +03:00
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 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{{ $inner := replaceRE "^\n" "" .Inner | string }}
|
||||
{{ $inner := replaceRE "^\r?\n" "" .Inner | string }}
|
||||
{{ if len .Params | eq 0 }}
|
||||
<pre><code>{{ $inner }}</code></pre>
|
||||
{{ else }}
|
||||
|
|
Loading…
Reference in a new issue