You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When two or more autolink markdowns are given as an input to the markdown parser without a space in between the autolinks render as a single anchor element.
Repro
Markdown string <link:1><link:1> given to the parser() method of markdown parser. Please note that the links within the <> are the same and no whitespace between them.
We use markdown parser and serializer to store the information for our rich text editor and we extend the prosemirror-markdown to leverage our needs. However, we enable only autolink feature from CommonMark flavor as part of our requirement.
The text was updated successfully, but these errors were encountered:
The way ProseMirror marks work, there is no concept of individual links, just text styled with link marks. So this distinction cannot be represented in ProseMirror's document model, and what you are looking for here will not be supported by prosemirror-markdown.
Thanks @marijnh for your quick response. Since we use both parser and serializer for converting markdown to DOM and vice versa, the serializer changes the data that is given to the editor. For example, with the same markdown string <link:1><link:1>, serializer would return [link1link1](link1) as the parser changes the DOM. This alteration in the original user-input markdown string can result in data loss or modification.
Also, when we tried with the common mark example editor or in markdown-it demo editor, we observed that they converted the same input into two different anchor elements.
So, it would be really helpful if there is any configuration we can utilize either in the parser or in the serializer to preserve the original markdown string that has been given earlier.
Issue
When two or more autolink markdowns are given as an input to the markdown parser without a space in between the autolinks render as a single anchor element.
Repro
Markdown string
<link:1><link:1>
given to theparser()
method of markdown parser. Please note that the links within the<>
are the same and no whitespace between them.Reproducing the same in prosemirror markdown editor in the example given in https://prosemirror.net/examples/markdown/
Current behavior
They are parsed as a single anchor element combined as below
However, if we give two different links without a space or the same link with a space, they are parsed as expected.
Expected behavior
They should be parsed as two separate links
Context
We use markdown parser and serializer to store the information for our rich text editor and we extend the prosemirror-markdown to leverage our needs. However, we enable only
autolink
feature from CommonMark flavor as part of our requirement.The text was updated successfully, but these errors were encountered: