[docutils:bugs] #476 Using short pygments class names with HTML5 writer results in strings being struck-out

"Günter Milde" via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/bugs/476/bd70e588a4a562f609c1d646a94ddf1f6a8cddb3.bugs@docutils.p.sourceforge.net>
- **status**: open --> open-fixed
- **Comment**:

Thank you for the bug report and MWE.
It is fixed in [r9471].



---

**[bugs:#476] Using short pygments class names with HTML5 writer results in strings being struck-out**

**Status:** open-fixed
**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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.