1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-08 08:37:53 +00:00
jekyll-theme-chirpy/_includes/fixlinenos.html
Cotes Chung 209058b84a Code improvement.
Passing parameters to includes
2020-07-22 23:02:11 +08:00

13 lines
486 B
HTML

<!--
Fixed kramdown code highlight rendering:
https://github.com/penibelst/jekyll-compress-html/issues/101
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
-->
{% if include.content contains '<pre class="highlight">' %}
{% assign content = include.content | replace: '<pre class="highlight"><code', '<code' %}
{% assign content = content | replace: '</code></pre>', '</code>' %}
{{ content }}
{% else %}
{{ include.content }}
{% endif %}