Skip to content

Fix an issue with formatting indented list items. - #1423

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_956156584
Jul 30, 2026
Merged

Fix an issue with formatting indented list items.#1423
copybara-service[bot] merged 1 commit into
masterfrom
test_956156584

Conversation

@copybara-service

Copy link
Copy Markdown

Fix an issue with formatting indented list items.

The previous code used a regular expression to skip over the indentation preceding a list item marker (as in -). However, the CommonMark API has a method for that, ListItem.getMarkerIndent(). By using that to determine the "real" start of the list item token, we avoid an issue where the value of that token (- ) did not correspond to the text at the position we had recorded.

The previous code used a regular expression to skip over the indentation preceding a list item marker (as in `  - `). However, the CommonMark API has a method for that, `ListItem.getMarkerIndent()`. By using that to determine the "real" start of the list item token, we avoid an issue where the value of that token (`- `) did not correspond to the text at the position we had recorded.

PiperOrigin-RevId: 956195264
@copybara-service
copybara-service Bot merged commit 7d9649f into master Jul 30, 2026
@copybara-service
copybara-service Bot deleted the test_956156584 branch July 30, 2026 01:21
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.

1 participant