include :code: eats tabs

Chris Pickel <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <CAB4Beb7BjST1aFPLAC0RPLcjd-Jg9Ckj=o-gqEFqHs+WRU33kA@mail.gmail.com>
I tried using the “include” directive with :code: and :tab-width: -1.
For some reason, all of the tabs disappeared. The attached example
demonstrates this by including a Makefile. Here’s the output:
https://files.twotaled.com/[email protected]/www/rst-tabs/out.html

If I remove :tab-width: -1, Pygments no longer detects the tabbed
lines as errors, but the quoted output still can’t be copy-pasted, as
hard tabs are required in Makefiles.

The inputs, for quick viewing:
https://files.twotaled.com/[email protected]/www/rst-tabs/doc.rst
https://files.twotaled.com/[email protected]/www/rst-tabs/Makefile

My system information:
Darwin joyeuse.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21
22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
rst2html.py (Docutils 0.14, Python 3.6.5, on darwin)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
doc.rst (text/x-rst, 84 B)
Makefile
========

.. include::    Makefile
   :code:       make
   :tab-width:  -1
Makefile (application/octet-stream, 85 B) - not displayed
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.