Max Nikulin <maniku...@gmail.com> writes: >>> I do not think that general case of nested links should be supported. >> >> Could you elaborate why? > > Effect of nested link is confusing. Users may be in doubts what link > should be activated, borders between links may be hidden. Nested links > are not allowed in HTML: > <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#technical_summary>
Unlike HTML, Org mode's notion of links fuzzes the line between images and links. We do not have a dedicated <img> markup. Is it confusing? Sometimes. But, on the other hand, we can have a notion of fully custom preview, even for non-images. The current situation with nested links not allowed, but also kind of allowed (during export and in image previews), is also confusing. > I am unsure what should be inner link from the old bug report. Are you > going to parse it as invalid "info:emacs#Echo". Users should have enough > links with similar descriptions created by `org-store-link' + > `org-insert-link'. Yes. However, when following the link, we will only consider the outermost link. > It is unclear to me how you are going to remove nesting for export > backends to avoid invalid documents generated by backends unaware that > links may be nested. > > Perhaps images as objects to export should be introduced in ox. The > challenge is to do it in a backward compatible way (including derived > backends). When exporting, we will pre-process all the nested links and only the links that are (a) a sole contents element of the parent link description; (b) are images. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>