Browse Source

added ungreedy flag for 'interesting' HTML post-processor

master
Alexander Wong 1 month ago
parent
commit
ccf5d18740
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      layouts/partials/post-process.html

+ 1
- 1
layouts/partials/post-process.html View File

@@ -1 +1 @@
{{ . | replaceRE "(<h[1-6]\\sid=\"([^\"]+)\"\\s?>)(.+)(</h[1-6]+>)" "${1}<a class=\"h-anchor\" href=\"#${2}\">${3}</a>${4}" | replaceRE "(?s)(<table>.+<\\/table>)" "<div class=\"scroll-indicator\">${1}</div>" | replaceRE "(?s)(<span class=\"katex-display\">.+</span>)" "<span class=\"scroll-indicator\">${1}</span>" | safeHTML }}
{{ . | replaceRE "(?U)(<h[1-6]\\sid=\"([^\"]+)\"\\s?>)(.+)(</h[1-6]+>)" "${1}<a class=\"h-anchor\" href=\"#${2}\">${3}</a>${4}" | replaceRE "(?sU)(<table>.+<\\/table>)" "<div class=\"scroll-indicator\">${1}</div>" | replaceRE "(?sU)(<span class=\"katex-display\">.+</span>)" "<span class=\"scroll-indicator\">${1}</span>" | safeHTML }}

Loading…
Cancel
Save