Reputation: 16546
I'm working on software creating annotations and would like my main data structure to be based around markdown.
I was thinking of working with an existing markdown editor, but hacking it so that certain tags, i.e. [annotation-id-001]Sample text.[/annotation-id-001]
did not show up as rendered HTML; the above would output Sample text.
in an HTML preview and link to a separate annotation with the ID 001
.
My question is, is this the most efficient way to represent this kind of metadata inside of a markdown document? Also, if a user wants to legitimately use something like "[annotation-id-001]"
as text inside of their document, I assume that I would have to make that string syntax illegal, correct?
Upvotes: 1
Views: 1666
Reputation: 358
I don't know what Markdown parser you use but you can abord your problem with different points of view:
[Sample text.](#annotation-id-001)
or use footnotes like [Sample text.](^annotation-id-001)
and put your annotations as footnotes.Upvotes: 2