logseq / mldoc

Another Emacs Org-mode and Markdown parser.
GNU Affero General Public License v3.0
233 stars 20 forks source link

bug: single right bracket in org link label #94

Closed PoiScript closed 2 years ago

PoiScript commented 2 years ago

Single right bracket in label is not rendering properly:

Screen Shot 2021-08-27 at 1 13 53 PM

It happens because the parser is now taking every character until it reaches ] and checks if the remaining part starts with ]]:

https://github.com/logseq/mldoc/blob/c0b5a837798d7e757b3f4eba162ba33999066fa2/lib/syntax/inline.ml#L627

I think the correct way should be taking every character until it reaches ]], something likes let label_part = take_until "]]".

Finally, thank you for brilliant job! Logseq is really an awesome tool.

RCmerci commented 2 years ago

hi @PoiScript , thanks for reporting! Just sent a fix PR