2020-08-14 19:35:00 +03:00
|
|
|
<!--
|
|
|
|
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">' %}
|
2020-08-15 16:05:48 +03:00
|
|
|
{% assign _content = _content | replace: '<div class="highlight"><pre class="highlight"><code', '<div class="highlight"><code' %}
|
|
|
|
{% assign _content = _content | replace: '</code></pre></div>', '</code></div>' %}
|
2020-08-14 19:35:00 +03:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ _content }}
|