<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 97: --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/</link><description>Recent changes to 97: --disable-tab-expansion flag</description><atom:link href="https://sourceforge.net/p/docutils/feature-requests/97/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 05 Mar 2024 16:40:53 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/docutils/feature-requests/97/feed.rss" rel="self" type="application/rss+xml"/><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#169f/7fb7</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Two minor points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can add a class value to a literal block preceding it with a "class" directive ("rst-class" with Sphinx):&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;class&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt; testme

::

   a literal block
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;TABs are converted to spaces in literal blocks, too :(&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Günter Milde</dc:creator><pubDate>Tue, 05 Mar 2024 16:40:53 -0000</pubDate><guid>https://sourceforge.netfe5f5ee8a0ef668a6679f4b07c4eadc089dfcacf</guid></item><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#52ea/00ba</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The negative value for the TAB expansion width is only supported for literal inclusions, not for the main document or included rST files.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Günter Milde</dc:creator><pubDate>Tue, 12 Dec 2023 16:14:18 -0000</pubDate><guid>https://sourceforge.nete6c3cd45e4d75a47eb3598632d53b4fc083a1bd6</guid></item><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#e46f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;A patch-set was posted to the "docutils-develop" mail list on 2023-10-29. See the thread in the &lt;a class="" href="https://sourceforge.net/p/docutils/mailman/docutils-develop/?viewmonth=202310"&gt;archive&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Günter Milde</dc:creator><pubDate>Thu, 09 Nov 2023 17:04:17 -0000</pubDate><guid>https://sourceforge.netaf0d1e4403e3db5e005a1198f6362c9c5332b2d1</guid></item><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#169f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Understanding my ask a bit more now:&lt;/p&gt;
&lt;p&gt;I want a code block options for &lt;code&gt;:tab-width: -1&lt;/code&gt;, tho preferably I want this on a global flag because I do not want &lt;code&gt;docutils&lt;/code&gt; to convert my tabs to spaces so my code is a) easier to copy from a post and b) so the reader may adjust the tab widths while reading.&lt;/p&gt;
&lt;p&gt;Tab conversion was unexpected as reStructuredText seemed to have no issues allowing me to use tabs as indentation for block as well as indentation inside &lt;code&gt;code-block&lt;/code&gt;s. Documentation was also confusing where some things (e.g. directives, CLI flags) had tab-width options that allowed values &amp;lt;1 whereas others did not.&lt;/p&gt;
&lt;p&gt;I considered trying to use a literal block, &lt;code&gt;::&lt;/code&gt;, as a workaround, but without the ability to add classes there would be no way to discern a “code block” literal from a literal literal. My best idea for a workaround for now is, for HTML at least, do a post-processing phase that finds all code blocks and runs their contents through GNU unexpand. This is obviously not ideal. Using the &lt;code&gt;code-block&lt;/code&gt; will still keep the document readable &amp;amp; allows Tree-sitter to highlight the children, so this hack will have to do.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">toastal</dc:creator><pubDate>Sun, 16 Jul 2023 10:27:37 -0000</pubDate><guid>https://sourceforge.net060fdb77dedaf15dd55b6b07d7e031bca1638db2</guid></item><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#52ea</link><description>&lt;div class="markdown_content"&gt;&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[restructuredtext parser]&lt;/span&gt;
&lt;span class="na"&gt;tab-width&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;-1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Did not work in a docutils.conf file either.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">toastal</dc:creator><pubDate>Sun, 16 Jul 2023 09:41:13 -0000</pubDate><guid>https://sourceforge.net07595f43177c67b3fcd58ac0c620c05b61d81aa2</guid></item><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#d270</link><description>&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;docutils: error: Error in option "--tab-width":&lt;br/&gt;
   ValueError: negative value; must be positive or zero&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No luck actually trying.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">toastal</dc:creator><pubDate>Sun, 16 Jul 2023 09:33:02 -0000</pubDate><guid>https://sourceforge.net65ea501ee4769cc4474eae6285adc125e23781e3</guid></item><item><title>#97 --disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/?limit=25#95f3</link><description>&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;A negative value prevents expansion of hard tabs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Found somewhere else in the docs. Not it the &lt;code&gt;--help&lt;/code&gt; text. Missing from &lt;a href="https://docutils.sourceforge.io/docs/user/config.html#tab-width" rel="nofollow"&gt;https://docutils.sourceforge.io/docs/user/config.html#tab-width&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">toastal</dc:creator><pubDate>Sun, 16 Jul 2023 09:31:59 -0000</pubDate><guid>https://sourceforge.net89ef69b58525f21a3931ce551300a3d4432e334a</guid></item><item><title>--disable-tab-expansion flag</title><link>https://sourceforge.net/p/docutils/feature-requests/97/</link><description>&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;Spaces are recommended for indentation, but tabs may also be used. Tabs will be converted to spaces. Tab stops are at every 8th column (processing systems may make this value configurable).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why tho? By converting tabs to spaces, we lose the accessibility aspect that tabs provide by letting the reader decide what’s comfortable to them as tab-width should be configurable on the reader’s side, not the writer’s. Some programming languages, like Go, tabs are overwhelmingly preferred &amp;amp; sometimes even required. Copying some code would not work.&lt;/p&gt;
&lt;p&gt;I would like to see a &lt;code&gt;--disable-tab-expansion&lt;/code&gt; flag that lets the author choose how they want their output to be output.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">toastal</dc:creator><pubDate>Sun, 16 Jul 2023 09:21:39 -0000</pubDate><guid>https://sourceforge.net67e6e06db5581a9dd0891e9d6fa1ee6dee41c8e4</guid></item></channel></rss>