summaryrefslogtreecommitdiff
path: root/docs/appendix
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-14 00:44:52 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2026-05-14 05:08:54 +0000
commit8bdb54adec6a985a698cbaef9df005c77b29ac99 (patch)
tree5aca7a3235b9ecd7d3139c61f7388889f27b549f /docs/appendix
parente31d383cc3c213a8e367d5cb3eabc0a1d222f192 (diff)
downloadvyos-documentation-8bdb54adec6a985a698cbaef9df005c77b29ac99.tar.gz
vyos-documentation-8bdb54adec6a985a698cbaef9df005c77b29ac99.zip
ci(doc-linter): fix RST code-block exit on short dedented lines
The dedent check inside `handle_file_action()` was if in_rst_codeblock: if len(line) > rst_codeblock_indent and not line[rst_codeblock_indent].isspace(): in_rst_codeblock = False This worked only when the next line was at least `rst_codeblock_indent + 1` chars long — the indexing `line[rst_codeblock_indent]` requires that. A short dedented line (e.g., a single character at column 0 under a directive indented at column 4) failed the length guard and `in_rst_codeblock` stayed True. The block remained open longer than it should, suppressing line-length checks on subsequent prose until either EOF or the next `.. code-block::` reset the state. Replace with a leading-whitespace-count check: on any non-blank line, exit the block when leading-ws is <= the directive's column. Blank lines don't reset the block context. Test: a 3-line file with `.. code-block:: text` directive at col 0, one body line, a single `a` at col 0, then a 113-char line at col 0. With the old logic the long line is still treated as inside the code block and not flagged. With the new logic the single-`a` dedent exits the block and the long line is flagged as expected. Tracked as items 6 and 12 of the rolling-side cleanup backlog from PR #2014 / #2019 / #2020 reviews. 🤖 Generated by [robots](https://vyos.io) (cherry picked from commit 6628b2901933f67568ba68617ee27c6f843c6dcf)
Diffstat (limited to 'docs/appendix')
0 files changed, 0 insertions, 0 deletions