build(aio): do not HTML format code-example contents (#15554)

The markdown renderer passes its output through an HTML pretty printer.
While this is good in most cases, it makes a mess of elements that expect
their content to be left untouched.

The pretty printer already ignores `pre` tags (and other built-ins) by
default. This fix allows us to specify other tags that should be left
alone.

Further it actually specifies this option for `code-example` and `code-pane`
tags, which expect to contain preformatted content.
This commit is contained in:
Pete Bacon Darwin
2017-03-28 16:22:44 +01:00
committed by Igor Minar
parent b7a89cec59
commit eac99c1b16
6 changed files with 48 additions and 21 deletions

View File

@ -5,8 +5,8 @@
<p>No linenums at code-tabs level</p>
<code-tabs >
<code-pane title='TS code file' language='ts'>class {
foo(param: string) {}
}</code-pane>
foo(param: string) {}
}</code-pane>
<code-pane title='HTML content file' language='html'>&lt;h1&gt;Heading&lt;/h1&gt;</code-pane>
<code-pane title='JSON data file' language='json' class='is-anti-pattern'>{ "key": "value" }</code-pane>
</code-tabs>
@ -15,8 +15,8 @@
<p>linenums=true at code-tabs level</p>
<code-tabs linenums='true'>
<code-pane title='TS code file' language='ts'>class {
foo(param: string) {}
}</code-pane>
foo(param: string) {}
}</code-pane>
<code-pane title='HTML content file' language='html'>&lt;h1&gt;Heading&lt;/h1&gt;</code-pane>
<code-pane title='JSON data file' language='json' class='is-anti-pattern'>{ "key": "value" }</code-pane>
</code-tabs>
@ -25,8 +25,8 @@
<p>No linenums at code-tabs level; linenums=true for HTML pane</p>
<code-tabs >
<code-pane title='TS code file' language='ts'>class {
foo(param: string) {}
}</code-pane>
foo(param: string) {}
}</code-pane>
<code-pane title='HTML content file' language='html' linenums='true'>&lt;h1&gt;Heading&lt;/h1&gt;</code-pane>
<code-pane title='JSON data file' language='json' class='is-anti-pattern'>{ "key": "value" }</code-pane>
</code-tabs>