kovetskiy / mark

Sync your markdown files with Confluence pages.
https://samizdat.dev
Other
972 stars 143 forks source link

Links with square brackets are not correctly parsed #461

Open ProvoK opened 1 week ago

ProvoK commented 1 week ago

What happened?

a link like

[example [text]](https://www.google.it)

won't be parsed correctly by the regexp

What did you expect to happen?

Expected to correctly parse the link, with the text including the square brackets

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Add a new test into pkg/mark/link_test.go TestParseLink with example below
  2. Assert new link parsed correctly
  3. test panics (index out of bounds)

Example markdown

[example [text]](https://www.google.it)

Further Information (please complete the following information)