188d8ffc69
It was lost by mistake while fixing #85
27 lines
921 B
HTML
27 lines
921 B
HTML
<!--
|
|
Refactor the HTML structure.
|
|
-->
|
|
|
|
{% assign _content = include.content %}
|
|
|
|
<!--
|
|
Suroundding the markdown table with '<div class="table-wrapper">. and '</div>'
|
|
-->
|
|
{% if _content contains '<table>' %}
|
|
{% assign _content = _content | replace: '<table>', '<div class="table-wrapper"><table>' %}
|
|
{% assign _content = _content | replace: '</table>', '</table></div>' %}
|
|
{% assign _content = _content | replace: '</table></div></code>', '</table></code>' %}
|
|
{% endif %}
|
|
|
|
|
|
<!--
|
|
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 _content contains '<pre class="highlight">' %}
|
|
{% assign _content = _content | replace: '<pre class="highlight"><code', '<code' %}
|
|
{% assign _content = _content | replace: '</code></pre>', '</code>' %}
|
|
{% endif %}
|
|
|
|
{{ _content }}
|