diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-04 19:33:20 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-04 19:33:20 +0000 |
| commit | a2745a179359419b255ff7de13839a8a1a31cc35 (patch) | |
| tree | f0dd7b4026125231d5c43595ac767a91414f3e45 /lib | |
| parent | 817a7d6a4eddb2eea305779333e27105abebeb87 (diff) | |
Generate anchor tags when elements have IDs
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/writers/markdown-writer.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/writers/markdown-writer.js b/lib/writers/markdown-writer.js index b4fbb8e..77bae94 100644 --- a/lib/writers/markdown-writer.js +++ b/lib/writers/markdown-writer.js @@ -129,6 +129,10 @@ function markdownWriter() { list.count = 0; } } + + if (attributes.id) { + fragments.push('<a id="' + attributes.id + '"></a>'); + } } function close(tagName) { |
