Skip to content

fix: A run that wraps in a list item is placed where it is - #1230

Open
seragAhmed wants to merge 1 commit into
vale-cli:v3from
seragAhmed:fix/1227-wrapped-run-placement
Open

seragAhmed wants to merge 1 commit into
vale-cli:v3from
seragAhmed:fix/1227-wrapped-run-placement

Conversation

@seragAhmed

Copy link
Copy Markdown

mapRun searched for a run as written, but a run that wraps inside a list item or blockquote has the item's indentation or > after each line break in the source. The search missed it, or found a copy further down and moved the source cursor past every run after it, so their alerts were placed by searching the whole file. Place such a run with wrappedRuns, as locateWrapped already does for blocks.

Fixes #1227

Assisted-by: Claude Code

mapRun searched for a run as written, but a run that wraps inside a list item or blockquote has the item's indentation or `>` after each line break in the source. The search missed it, or found a copy further down and moved the source cursor past every run after it, so their alerts were placed by searching the whole file. Place such a run with wrappedRuns, as locateWrapped already does for blocks.

Fixes vale-cli#1227

Assisted-by: Claude Code
@github-actions

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

Before this can be merged, please read Vale's contributor license agreement, which is four short points, and post a new comment on this pull request whose entire text is the sentence below, with no quote, no extra words, and no trailing period. Don't use the Reply button, which quotes this comment. This is once per person, not per pull request.


I have read the CLA and I agree to it


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Newlines inside Markdown lists can cause the walker to lose its place and lead to O(n^2) runtime for alerts for the rest of the file

1 participant