[docutils:bugs] #476 Using short pygments class names with HTML5 writer results in strings being struck-out
John Thorvald Wodder II via Docutils-develop <[email protected]>
| Newsgroups | gmane.text.docutils.devel |
|---|---|
| Message-ID | <[email protected]> |
---
**[bugs:#476] Using short pygments class names with HTML5 writer results in strings being struck-out**
**Status:** open
**Created:** Tue Nov 07, 2023 07:20 PM UTC by John Thorvald Wodder II
**Last Updated:** Tue Nov 07, 2023 07:20 PM UTC
**Owner:** nobody
When converting a reStructuredText document to HTML5 with the `--syntax-highlight=short` option, if any tokens in the highlighted code use the `s` class (for generic strings), docutils will render those tokens by wrapping them in `<s>...</s>`, producing struck-through text.
For example, given the following rST file:
```rst
.. code:: shell
cat <<EOF
Hello World!
EOF
```
Running `docutils --syntax-highlight=short` on this file produces an HTML file containing the following:
```html
<pre class="code shell literal-block"><code>cat<span class="w"> </span><s><<EOT
Hello World!
EOT</s></code></pre>
```
Note the `<s>...</s>` around the heredoc, which is rendered as struck-through text.
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.