Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multi-line bold, italics, and strikethrough #4670

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

ChrisPenner
Copy link
Contributor

Overview

fixes #4669

The formatter will break up bold, italic, and strikethrough sections over multiple lines, but the lexer doesn't parse multi-line sections like that.

I changed it so the parser can handle multiline bold, italics and strikethroughs as long as they're part of the same paragraph.

Implementation notes

  • Adds whitespaceWithoutParagraphBreak helper which parses a block of whitespace with at most 1 newline.
  • Use the new whitespace helper when parsing more docs within a bold, italic, or strikethrough.

Test coverage

  • Added regression test to doc formatter

@ChrisPenner ChrisPenner self-assigned this Feb 5, 2024
@ChrisPenner ChrisPenner marked this pull request as ready for review February 5, 2024 18:23
@ChrisPenner ChrisPenner requested a review from aryairani February 5, 2024 18:24
@ChrisPenner ChrisPenner changed the title Allow multi-line bold, italics, and strikethru Allow multi-line bold, italics, and strikethrough Feb 5, 2024
@aryairani aryairani merged commit 6f67452 into trunk Feb 6, 2024
7 checks passed
@aryairani aryairani deleted the cp/doc-italics branch February 6, 2024 03:13
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.

LSP auto-format breaks documentation due to wrapping
2 participants