2020-08-14 19:35:00 +03:00
|
|
|
<!--
|
|
|
|
Refactor the HTML structure.
|
|
|
|
-->
|
|
|
|
|
|
|
|
{% assign _content = include.content %}
|
|
|
|
|
2020-12-24 19:22:21 +03:00
|
|
|
<!--
|
|
|
|
In order to allow a wide table to scroll horizontally,
|
|
|
|
we suround the markdown table with `<div class="table-wrapper">` and `</div>`
|
|
|
|
-->
|
2020-08-14 19:35:00 +03:00
|
|
|
{% if _content contains '<table>' %}
|
2020-12-14 10:01:05 +03:00
|
|
|
{% assign _content = _content
|
|
|
|
| replace: '<table>', '<div class="table-wrapper"><table>'
|
|
|
|
| replace: '</table>', '</table></div>'
|
|
|
|
| replace: '</table></div></code>', '</table></code>'
|
|
|
|
%}
|
2020-08-14 19:35:00 +03:00
|
|
|
{% 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-12-14 10:01:05 +03:00
|
|
|
{% assign _content = _content
|
|
|
|
| replace: '<div class="highlight"><pre class="highlight"><code', '<div class="highlight"><code'
|
|
|
|
| replace: '</code></pre></div>', '</code></div>'
|
|
|
|
%}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<!-- Add attribute 'hide-bullet' to the checkbox list -->
|
|
|
|
{% if _content contains '<li class="task-list-item"><' %}
|
|
|
|
{% assign _content = _content
|
|
|
|
| replace: '"task-list-item"><', '"task-list-item" hide-bullet><'
|
|
|
|
%}
|
2020-08-14 19:35:00 +03:00
|
|
|
{% endif %}
|
|
|
|
|
2020-12-14 10:01:05 +03:00
|
|
|
<!-- return -->
|
2020-08-14 19:35:00 +03:00
|
|
|
{{ _content }}
|