You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example print-rcdom shows that it parses the contents of the <pre>. In HTML it is usually only relevant for browsers using the given CSS for styling but not as a general concept.
My use-case is that I want to have arbitrary data in the <pre><code> section, even invalid html and I don't want any interpretation of it. See https://lastlog.de/blog/vscodium_and_nix_develop.html where I have bash output inside these boxes.
So my question is:
How to parse <pre> content as NodeData::Text instead of yet another bunch of HTML tags?
The example below shows that all the html code is actually parsed.
The html5ever implementation for <pre> is alright and my problem was caused by the post-processing of the let dom = parse_document(RcDom::default(), opts).one(input); later on.
The example
print-rcdom
shows that it parses the contents of the<pre>
. In HTML it is usually only relevant for browsers using the given CSS for styling but not as a general concept.My use-case is that I want to have arbitrary data in the
<pre><code>
section, even invalid html and I don't want any interpretation of it. See https://lastlog.de/blog/vscodium_and_nix_develop.html where I have bash output inside these boxes.So my question is:
How to parse
<pre>
content as NodeData::Text instead of yet another bunch of HTML tags?The example below shows that all the html code is actually parsed.
The text was updated successfully, but these errors were encountered: