metanorma / coradoc

Coradoc is the Core AsciiDoc Parser used by Metanorma
MIT License
1 stars 4 forks source link

ReverseAdoc: When an `<a>` element has only an HTTP link but no text, do not render empty `[]` #108

Open ronaldtse opened 5 months ago

ronaldtse commented 5 months ago

The green is wrong and red is right.

image
hmdne commented 5 months ago

There is a heuristic to detect text to the right. In some cases, not adding [] may lead to broken link. We could either add [] or a space, the space would lead to an additional space. I believe the example you have shown is a case of this, since this is a unicode parenthesis and it would embed a parenthesis into the link, breaking the link.

ronaldtse commented 4 months ago

I believe the example you have shown is a case of this, since this is a unicode parenthesis and it would embed a parenthesis into the link, breaking the link.

This is an interesting case. I'm not sure what is the best way to handle this.