tui.editor icon indicating copy to clipboard operation
tui.editor copied to clipboard

Links with references cannot be inserted in Markdown mode

Open fi5er opened this issue 4 years ago • 4 comments

Describe the bug

Links that refer to a link reference are defined in CommonMark as well as GitHub Flavored Markdown:

- [First link][1]
- [Second link][reflabel]
- [third]

[1]: http://example.org
[reflabel]: http://example.com
[third]: http://example.net "optional title"

Entering any of these in TUI Editor's (v 3.0.0) Markdown mode does not create a link.

To Reproduce

Steps to reproduce the behavior:

  1. Copy the example markdown given above.
  2. Go to https://ui.toast.com/tui-editor
  3. Delete the content of the left panel (markdown).
  4. Paste the copied example markdown.
  5. The right panel shows that the input has been parsed (the list items work) but no links are created.
  6. Switch to wysiwyg mode
  7. Switch back to markdown mode
  8. See that all the brackets in the links have been escaped.

Expected behavior

Three list items, each containing a link, should have been created.

This works fine in the original Markdown dingus, the Commonmark reference editor and the GFM reference editor (like the one I'm typing in right now).

Desktop:

  • OS: Kubuntu Linux
  • Browser: Firefox
  • Version: 89.0.2 (64-bit)

fi5er avatar Jul 05 '21 08:07 fi5er

@fi5er Currently, we made this specification work only if it was designated as referenceDefinition: true due to the performance issue. However, I just found out there is an error in the parsing code in our editor for a link reference. So I will fix it and let you know when it's fixed. Thank you.

js87zz avatar Jul 08 '21 01:07 js87zz

Waiting!

ats1999 avatar Jul 09 '21 16:07 ats1999

waiting

jack9603301 avatar Jul 14 '21 11:07 jack9603301

Hello everyone,

My team is considering using the editor in one of our projects, but this bug might prevent us from doing so. Is there any progress on fixing this bug?

christophblessing avatar Oct 13 '23 10:10 christophblessing