Markdown: allow named anchors as <a name="id"></a> and {#id}
Support author-defined named anchors within the document. Use HTML style
<a name="..."></a> as well as a common markdown extension, {#id}.
Bug: issue 80
Change-Id: I4e89e6eefb268900969618ced1f3b5556cc4a4ef
diff --git a/Documentation/markdown.md b/Documentation/markdown.md
index 7ee70d9..2dfa85f 100644
--- a/Documentation/markdown.md
+++ b/Documentation/markdown.md
@@ -335,6 +335,18 @@
file will present the rendered markdown, while a link to a source file
will display the syntax highlighted source.
+### Named anchors
+
+Explicit anchors may be inserted into a document to make stable references.
+This is recommended at the end of a section header to avoid ambigous names.
+The following are identical and will wrap the section header inside of an
+anchor tag:
+
+```
+## Examples {#live-examples}
+## Examples <a name="live-examples"></a>
+```
+
### Images
Similar to links but begin with `!` to denote an image reference:
@@ -377,8 +389,8 @@
parser with no warnings, and no output from that section of the
document.
-There is a small exception for the `<iframe>` element, see
-[HTML IFrame](#HTML-IFrame) below.
+There is a small exception for `<a name>` and `<iframe>` elements, see
+[named anchor](#Named-anchors) and [HTML IFrame](#HTML-IFrame).
## Markdown extensions