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:

committed by
Igor Minar

parent
b7a89cec59
commit
eac99c1b16
@ -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'><h1>Heading</h1></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'><h1>Heading</h1></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'><h1>Heading</h1></code-pane>
|
||||
<code-pane title='JSON data file' language='json' class='is-anti-pattern'>{ "key": "value" }</code-pane>
|
||||
</code-tabs>
|
||||
|
Reference in New Issue
Block a user