FransBouma / DocNet

Your friendly static documentation generator, using markdown files to build the content.
http://fransbouma.github.io/DocNet/
248 stars 36 forks source link

Implement custom named Anchor markdown extension #9

Closed FransBouma closed 8 years ago

FransBouma commented 8 years ago

To be able to refer to parts of a document it should be possible to place an anchor at the position to reference so elsewhere a document can link to it.

E.g. @anchor Foo

will result in <a name="Foo"></a>

and can be referred to with #Foo

It's not a high priority, the markdown parser does allow <a name="Foo"></a> html but falling back to html is something that should be avoidable.

FransBouma commented 8 years ago

Looks like MarkdownDeep (which we now have as parser) supports this, look into that.

FransBouma commented 8 years ago

This is implemented in MarkdownDeep, using {#idname} after a header. See PHP Markdown extra.