Preserve nodes on code includes
Specifically, I wrap my code snippets with a Custom Element which presents them as tabs. It would look like this in code
<s2q-snippet>
<pre class="include-code" slot="shape">
path: example/values-focus-node.ttl
highlight: turtle
</pre>
<pre class="include-code" slot="query">
path: example/values-focus-node.ttl.rq
highlight: sparql
</pre>
</s2q-snippet>
The element s2q-snippet renders a two tabs and distributes the snippets in two slots, shape and query
Problem is, that the [slot] attributes are not preserved in the output if bikeshed.
-<pre class="include-code highlight" slot="shape">
+<pre class="include-code highlight">
I would expect any additional HTML attributes to be preserved as-is in the rendered HTML
Yeah, I should fix this. Right now I just generate a brand-new element holding the attributes I parsed from the contents, but merging into the existing element is definitely doable.
Okay, doing this was a larger project than I thought, but it was worthwhile! Should all be good, but lmk if you have any issues.
Worked well for my use case. Thanks!
While I have your attention, could you merge #2093? I rebase and updated a number of times to sync with latest changes :)
Reopening because this is temporarily reverted while I bake the code more. See https://github.com/speced/bikeshed/issues/1773#issuecomment-1481598821 for details.
Hello. Any chance to revisit this?
Yup, the "temporary" revert is lasting longer than planned, but it should be finished this quarter.