Hi,
Is there any plan to introduce some native handling of text framents for links with goldmark ? If not, could it be possible to add that feature to link hooks ? In the form of an attribute map, which currently is absent for links, for some reason, eventhough I could imagine a number of useful context informations. And right now, how would you process the syntax ?
That’s a reasonable feature request, I’d like that, too. But how should the attribute syntax get parsed inline after a link element? I suspect this to be a major hurdle for any implementation.
I would see this inside the link brackets, not as custom attributes. no special syntax but the fragment is extracted and obtained with .Fragments.Start_text etc.
Currently it’s treated as any fragment - as it starts with # - so it’s fine.
but we could something like [texte](address {start_text=“début” fin_text="sdfd
the same would apply to inline elements, for instance essai {.class} would give the class .class produce <strong class=class>essai</strong>.
arguably this general case would be the most useful, as the fragment syntax is simple enough already, there’s little interest in handling it. just keep it as a normal fragment.