Skip to content

[TASK] Add a script that fixes the indentation of reST files - #637

Merged
linawolf merged 1 commit into
mainfrom
task/rest-indentation-script
Oct 16, 2026
Merged

linawolf merged 1 commit into
mainfrom
task/rest-indentation-script

Conversation

@linawolf

@linawolf linawolf commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Manuals often indent reST with 3 spaces, put one space after "..",
and have headline underlines that are shorter or longer than the
headline. Fixing that by hand in a whole manual is slow and easy to
get wrong.

The writing skill now has a script that indents each reST level by
4 spaces, puts two spaces after "..", pads list markers to 4 columns,
and makes headline over- and underlines as long as the headline. Code
examples, literal blocks, and comments keep their indentation. With
--check, the script only lists the files it would change. It skips
files with merge conflict markers, because "=======" looks like a
headline underline.

The script was used for the form manual of TYPO3 Core. The rendered
HTML stayed the same, except where the markup was broken before.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com
Signed-off-by: Lina Wolf

Manuals often indent reST with 3 spaces, put one space after "..",
and have headline underlines that are shorter or longer than the
headline. Fixing that by hand in a whole manual is slow and easy to
get wrong.

The writing skill now has a script that indents each reST level by
4 spaces, puts two spaces after "..", pads list markers to 4 columns,
and makes headline over- and underlines as long as the headline. Code
examples, literal blocks, and comments keep their indentation. With
--check, the script only lists the files it would change. It skips
files with merge conflict markers, because "=======" looks like a
headline underline.

The script was used for the form manual of TYPO3 Core. The rendered
HTML stayed the same, except where the markup was broken before.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lina Wolf
@linawolf
linawolf force-pushed the task/rest-indentation-script branch from 07cda39 to b6eb4d5 Compare October 16, 2026 05:23
@linawolf
linawolf merged commit bc9ae2b into main Oct 16, 2026
2 checks passed
@linawolf
linawolf deleted the task/rest-indentation-script branch October 16, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant