diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-25 01:50:23 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-25 01:50:23 -0500 |
| commit | 8822b0dab56ca50269771b4c9d06b78657c2b8b4 (patch) | |
| tree | e318861637cdcf3281f123fe4ca01b9957d78c4e /languages/python/githooks | |
| parent | f7139d82173ccf9effdcdee50df22912f3f05fa0 (diff) | |
| download | rulesets-8822b0dab56ca50269771b4c9d06b78657c2b8b4.tar.gz rulesets-8822b0dab56ca50269771b4c9d06b78657c2b8b4.zip | |
fix(lint-org): stop flagging correctly paired verbatim blocks
org-lint's invalid-block checker flags both delimiters of a paired example or src block whose body holds a heading-shaped line. Its parser reads the `** ` as a structural break and loses the open block. Every org file that documents org syntax inside a block collects two false findings.
The checker is org-lint's own, not one lint-org implements, so I filtered its output instead of patching a local checker. `lo--matched-block-regions` pairs blocks by scanning lines under org's real rule (once open, only the block's own `#+end_TYPE` closes it). A finding inside a matched region gets dropped, delimiters included, since that's where org-lint reports. I scanned lines rather than asking org because org's parser is what's confused.
An unterminated block never lands in a matched region, so it still reports. Three tests cover the false positives: a heading in an example block, a literal `#+end_example` inside a src block, and uppercase delimiters. Two more guard the real finding, including a file with one paired and one unterminated block that proves the suppression is per-block.
Diffstat (limited to 'languages/python/githooks')
0 files changed, 0 insertions, 0 deletions
