click icon indicating copy to clipboard operation
click copied to clipboard

Fix the indentation size in code snippets

Open gr1seo opened this issue 1 month ago • 2 comments

Use the same indentation size (4 spaces) for python code snippets, and remove the misplaced newline.

gr1seo avatar Nov 29 '25 09:11 gr1seo

How did you discover this? Did you use some tool? Seems like adjusting spaces in random files.

Rowlando13 avatar Nov 30 '25 02:11 Rowlando13

I found missing indentation in the Utilities section under Finding Application Folders. After fixing it, I rechecked the docs using these regexes:

^\.\. click\:(?:example|run)\:\:\n{1,2}^(?: {1,3}| {5,7}| {9,11}| {13,15})[\w@] ^```python\n{1,2}^ {1,}[\w@] (added after an additional recheck following your comment, second commit 😅) ^(?:```python|\:caption\:.*\.py)\n{1,2}^(?: {1,3}| {5,7}| {9,11}| {13,15})[\w@] ^ *(?:class|def|with|for|while|if|elif|else).*?\:\n{1,2}(?: {0,3}| {5,7}| {9,11}| {13,15})[\w@]

I also reviewed the files with visible spaces enabled. The fix was done manually, without any tools, just the IDE’s find functionality.

gr1seo avatar Nov 30 '25 15:11 gr1seo

@gr1seo Thanks for find these. Unfortunately I am not going to accept them at this time. Restructured text is a bit finicky with stuff and can silently fail with formatting, so it would require me to go through and manually view every section of the docs that correlates to the change. As it is everything works. I am planning on implementing a formatter in the future to handle these issues. I will leave this PR is draft for reference.

Rowlando13 avatar Dec 24 '25 23:12 Rowlando13