-
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
Bug: $convertFromMarkdownString method from @lexical/markdown ignores linebreaks #6138
Comments
I think your input is converted to like this: |
This is how GitHub renders the markdown that you've provided, which is consistent with the screenshot in this report:
I made sure to reproduce it exactly by using this from the browser console, and then pasting it into this comment: copy('- item\n- item2\n1. item1\n2. item2\n3. item3\nTest\nTest\n- another list\n- with items\n') |
There would be new feature coming about |
I saw on documentation https://lexical.dev/docs/api/modules/lexical_markdown that there's a However in my current export of the method, it only has 3 arguments: |
Oh, thanks mate, I see, I guess I just need for that new feature to be released on a new version right? |
Yes, I guess so. You could open a new issue for that feature when it behaves somewhat unexpectedly. |
is there a way to be notified when a new version is released to check for this feature? |
well, giving a star to this repo starts updating release news on your github feed. |
Do you know the timeline for releasing this? |
#6144 is the issue tracking what should be done regarding the docs being built directly from main |
Releases tend to happen once or twice a month, just going by history. I'd expect the next one by mid-June but probably sooner. |
yes that correct, https://lexical.dev/docs/api/modules/lexical_markdown#converttomarkdownstring it is now available in v0.16.0 |
Issue edited:
$convertFromMarkdownString
is avoiding multiple "\n", in this case for example:If I provide as an initial content something like this:
editorState: () => $convertFromMarkdownString( 'ab\n\nc\n\n\n\n - item\n- item2\n1. item1\n2. item2\n3. item3\n\nTest\n\nTest\n- another list\n- with items\n- {{additional_information}} ', TRANSFORMERS, ),
I expect to have some output like this:
However I get this:
Lexical version: Latest
The current behavior
The expected behavior
Output is properly rendered and it must be as the first screenshot provided.
The text was updated successfully, but these errors were encountered: