-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
enhancementAn enhancement or new featureAn enhancement or new featuregood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage
Description
highlight.js does not highlight processing instructions in XML mode (except for the pseudo processing instruction <?xml ...?>)
I am using highlight.js 11.4.0 and the following HTML code:
<pre class="language-xml">
<?ul4 langs(*names)?>
<?whitespace strip?>
<?doc Languages?>
<ul>
<?for n in names?>
<li>
<?printx n?>
</li>
<?end for?>
</ul>
</pre>I include highlight.js like this (in the <head>):
<script src="/static/highlight.js/11.4.0/highlight.min.js"></script>I activate highlight.js by the following <script> at the end of the <body>:
<script>
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('pre, code').forEach(el => {
hljs.highlightElement(el);
});
});
</script>The only highlighted parts in the result however are the start and end tags. None of the processing instructions get hightlighted:
For information about XML processing instructions see: https://www.w3.org/TR/REC-xml/#sec-pi
Metadata
Metadata
Assignees
Labels
enhancementAn enhancement or new featureAn enhancement or new featuregood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage
