Lonely <pre>-tags should be handled as a Code-node

#17 · closed · 1 comments

View on GitHub ↗

nicojs

I think lonely `<pre>` tags, i.e. `<pre>` without a `<code>` as child, should be handled the same way as lonely `<code>` tags. For example: ``` html <p>some markdown <pre>inc code</pre> test</p> ``` Should be converted to this AST: ``` xml <document> <paragraph> <text>some markdown </text> <code>inc code</code> <text> test</text> </paragraph> </document> ```

Comments

nicojs

I just found out that `<pre>` is a block level html element. It is not allowed to put this inside a `<p>` tag for example. With this in mind, i want to use this issue to make sure that lonely `<pre>` tags are treated the same way as `<pre>` tags with a `<code>` element inside them So ``` html <pre>some code</pre> ``` Should be ``` xml <document> <code-block>some code</code-block> </document> ```