Repository navigation
fix: place a summary-scoped alert on the prose it counted - #1192
Merged
Merged
Conversation
The summary block had no position in the source, so a match found in it was located by searching the whole file for its text, and the first copy won -- in front matter, a code block, or a heading, none of which the summary holds. Record where each piece of prose written to the summary sits in the source, as runs, the way a block carrying inline markup already does, so the match is anchored where it was counted. Fixes vale-cli#1191 Signed-off-by: Eljees <57435526+Eljees@users.noreply.github.com>
|
Before this is reviewed, please read the AI-Assisted Contributions section of the contributing guide and make sure this change meets it: you can explain every line, the description is your own and brief, it fixes a bug you hit or a feature agreed in an issue, it does not touch undocumented options, and any substantial tool use is noted. |
|
The license agreement is signed. |
Contributor
Author
|
I have read the CLA and I agree to it |
Assisted-by: Codex
Member
|
Merged, thanks. I resolved the conflict with #1186 locally and fixed a letter in the scenario name on the way in. The benchstat toolchain change is welcome too; that job had been red for a while. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1191.
The summary block had no position in the source, so a match found in it was placed by searching the whole file for its text, and the first copy won, even in front matter, a code block or a heading that the summary never held. Each piece of prose written to the summary now records where it sits in the source as runs (the mapping blocks with inline markup already use), and the summary block carries them, so
anchor()places the match where it was counted. The summary text itself is unchanged.On the issue's reproducer,
front.md,code.mdandheading.mdnow report 7:10, 7:10 and 3:10;control.mdstays at 3:10. The new e2e casechecks/occurrence-summary-anchorfails onv3and passes with the change; the rest of the suite passes locally (the AsciiDoc/RST cases were skipped here, no asciidoctor/rst2html).Assisted-by: Claude Code