Check for existing issues
Environment
Vale version: 3.10.0
OS: macOS 15.3 (Darwin arm64)
Describe the bug / provide steps to reproduce it
Description
When an AsciiDoc document sets :sectnums: or :toc: in its header, Vale stops recognising level-2+ headings (==, ===, …) as heading tokens. Only the document title (=) is detected. Any rule using scope: heading silently skips all sub-headings.
Minimal reproduction
.vale.ini:
StylesPath = styles
[*.adoc]
BasedOnStyles = Vale
styles/Test/Headings.yml:
extends: capitalization
message: "'%s' should use title-style capitalization."
level: error
scope: heading
match: $title
test.adoc - with :sectnums::
= document title
:sectnums:
== about the document
Some text.
Expected: two errors - document title and about the document
Actual: one error - only document title
Bisection
Each attribute independently triggers the bug:
| Attribute |
Findings |
| (none) |
2 (both headings) |
:sectnums: |
1 (title only) |
:toc: left |
1 (title only) |
:sectnumlevels: 5 |
2 (both) |
:sectanchors: |
2 (both) |
:toclevels: 5 |
2 (both) |
So :sectnums: and :toc: each individually disable sub-heading detection; other common attributes do not.
Workaround
Strip :sectnums: and :toc: from the file before passing it to Vale (blanking lines rather than deleting them preserves line numbers):
sed 's/^:sectnums:.*$//; s/^:toc:.*$//' file.adoc | vale --ext=.adoc -
Check for existing issues
Environment
Vale version: 3.10.0
OS: macOS 15.3 (Darwin arm64)
Describe the bug / provide steps to reproduce it
Description
When an AsciiDoc document sets
:sectnums:or:toc:in its header, Vale stops recognising level-2+ headings (==,===, …) as heading tokens. Only the document title (=) is detected. Any rule usingscope: headingsilently skips all sub-headings.Minimal reproduction
.vale.ini:styles/Test/Headings.yml:test.adoc- with:sectnums::Expected: two errors -
document titleandabout the documentActual: one error - only
document titleBisection
Each attribute independently triggers the bug:
:sectnums::toc: left:sectnumlevels: 5:sectanchors::toclevels: 5So
:sectnums:and:toc:each individually disable sub-heading detection; other common attributes do not.Workaround
Strip
:sectnums:and:toc:from the file before passing it to Vale (blanking lines rather than deleting them preserves line numbers):