-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[lexical-markdown] Fix: normalize markdown in $convertFromMarkdownString to comply with CommonMark spec (2nd try) #6629
Merged
Merged
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f464bae
code-md
GermanJablo f6830a3
sanitize markdown
GermanJablo 3d20030
Merge branch 'main' into code-md
GermanJablo cb29c2d
save
GermanJablo 9b0d561
save
GermanJablo 3753e3e
Merge branch 'main' into code-md
GermanJablo eb16b01
nit comment
GermanJablo e9a741b
fix import
GermanJablo e15a4d8
rename sanitizeMarkdown to normalizeMarkdown
GermanJablo b9b6ee3
fix regex for code block
GermanJablo c936c11
fix tests
GermanJablo 60fd030
fix single line code
GermanJablo 57aa31f
fix table
GermanJablo 45e8d82
Merge branch 'code-md' into code-md2
GermanJablo 65ba7ef
Update packages/lexical-markdown/src/MarkdownTransformers.ts
GermanJablo 49c70d9
Update packages/lexical-markdown/src/MarkdownTransformers.ts
etrepum fc9babd
prettier
etrepum 55aa46d
Update packages/lexical-markdown/src/index.ts
etrepum 7693d3a
Merge branch 'main' into code-md2
etrepum 1ce7248
prettier
potatowagon d58c159
add unit test
potatowagon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a condition here, to only normalizeMarkdown if shouldPreserveNewLines = false?
internally we are using the shouldPreserveNewLines = true feature and normalizeMarkdown is causing eg.
to convert to
hellohello
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add some test coverage for this to prevent such regressions in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in d58c159