bjuppa / macropiche

PHP tool for HTML display of view-templates (of a pattern library)
1 stars 0 forks source link

<pre> invalid inside <samp> #7

Closed bjuppa closed 8 years ago

bjuppa commented 8 years ago

So... <samp> may only contain phrasing content which doesn't include <pre>. This means the current <samp><pre><code> output around processed templates is invalid HTML.

Could this be solved by putting the <samp> inside the <code> element?

See #5 for the discussion leading to the current solution.

bjuppa commented 8 years ago

Yes, putting <samp> inside the <code> element seems to work. It's valid html, and it renders nicely both with prism syntax highlighter (which removes the <samp> element from the DOM) as well as without any styling at all.