Forgot code block being wrapped for code-copy btn
Should have been in an earlier commit. oops. Its adapted from Bryce's code which used njk and this is liquid. so set became assign.
This commit is contained in:
parent
aecb4ae267
commit
02bd9c09d9
|
@ -40,7 +40,20 @@ layout: default
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ content }}
|
|
||||||
|
{% assign Content = content %}
|
||||||
|
{% assign withoutDivStart = '<pre ' %}
|
||||||
|
{% assign withDivStart = '<div class="highlight codeblock"><pre ' %}
|
||||||
|
{% assign withoutDivEnd = '</code></pre>' %}
|
||||||
|
{% assign withDivEnd = '</code></pre></div>' %}
|
||||||
|
|
||||||
|
{% if content contains withoutDivStart %}
|
||||||
|
{% assign Content = content | replace: withoutDivStart, withDivStart %}
|
||||||
|
{% assign Content = Content | replace: withoutDivEnd, withDivEnd %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ Content }}
|
||||||
|
|
||||||
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
|
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue