mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #104] tests/docs: read an indented code block as code, not prose #156
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#156
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/104
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9836📝 Commits (1)
4baf1c8tests/docs: read an indented code block as code, not prose📊 Changes
1 file changed (+18 additions, -1 deletions)
View changed files
📝
tests/test_docs_repeated_lines.py(+18 -1)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):tests/test_docs_repeated_lines.pyis red onmain(f48adad7), and it is the check's own bug:tests/semantic/README.mdshows two commands in an indented code block (four spaces, no fence) whose first forty characters are identical:repeated_lines()already skipped fenced blocks, and its docstring says it flags prose that is "neither a list item, table row, heading or code", but it only recognised the fenced kind, so the two command lines were compared as prose. Introduced by the merge of#9750.A command block is not a sentence kept twice, and editing the README to dodge the check would leave the next indented block to trip it again, so an indented line is now skipped the way a fenced one already was: four spaces (Markdown's code block) or a tab.
Tested
Clean worktree at
main(f48adad7):Old detector against new, over every tracked Markdown file, so this does not buy green by hiding duplicates:
The one report the fix removes is the one that was wrong. The test gains the case directly: an indented two-command block is not reported, and a tab-indented one is not either.
Windows 11, Python 3.12.10. No game files, no GPU: Markdown plus one standard-library test.
AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. - not applicable, no translator change.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.