Forum Bugs

Links not generated for empty content anchors

yyang
It seems PDF links are not generated if the target is an anchor with empty content, like `<a id="name"></a>`. Please see the attachment for a minimal example.

test.html is a valid HTML file. Link "one" is not generated for `<a id="one"></a>`, although the style is good. If the anchor is changed to `<a id="two">&nbsp;</a>`, the link is fine.

One reason why empty content anchors have to be used is to insert an anchor "anywhere" in Markdown. Thanks!
  1. test.zip21.5 kB
mikeday
Yes, this difficulty linking to empty inline elements has been a longstanding limitation; we do hope to rectify it in the future but in the meantime it is necessary to link to blocks or section elements, or inline elements containing text. Sorry for the inconvenience!
yyang
Thanks for your reply! I now understand this issue better. Adding a placeholder is quite acceptable.