-
Notifications
You must be signed in to change notification settings - Fork 145
Description
There is a need for implementation of the target attribut for links
Given is a common real-world scenario like this
<a href="http://example.com/" target="_blank">Hello, world!</a>
Currently supported syntax style in CommonMark.Net is at maximum:
[link](url "title")
http://stackoverflow.com/questions/4425198/markdown-target-blank already suggests several possible solutions for the different (common) markup versions.
As of above article, the most probably answer might be one of these syntax variants:
Maybe too simple solution ;-)
[link](url "title" "_blank")
With Markdown-2.5.2, you can use this:
[link](url){:target="_blank"}
Some projects use this style of extended attribution: {[attr]="[prop]"}
[link](url){target="_blank"}
Kramdown/standard common mark
[link](url){:target="_blank"}
https://talk.commonmark.org/t/multimarkdown-link-and-reference-image-attributes/1916
http://fletcher.github.io/MultiMarkdown-5/syntax.html#linkandimageattributes
https://talk.commonmark.org/t/links-with-attributes-like-target-class-etc/2246
After reading the specs and many discussion threads, I'd suggest following the [attr]="[prop]"
system and keeping backwards compatibility to today's title definition:
[link](url "title")
[link](url title="title")
[link](url "title" target="_blank")
[link](url target="_blank" "title")
[link](url title="title" target="_blank")
[link](url "title" target="_blank" class="footer")
[link](url title="title" target="_blank" class="footer")
Everything additional must follow the [attr]="[prop]"
standard,
everything else must be in quotation marks and represents the title attribute,
everything else is invalid.