aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-02-04 19:33:20 +0000
committerMichael Williamson <mike@zwobble.org>2015-02-04 19:33:20 +0000
commita2745a179359419b255ff7de13839a8a1a31cc35 (patch)
treef0dd7b4026125231d5c43595ac767a91414f3e45 /tests
parent817a7d6a4eddb2eea305779333e27105abebeb87 (diff)
Generate anchor tags when elements have IDs
Diffstat (limited to 'tests')
-rw-r--r--tests/writers/markdown-writer.tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/writers/markdown-writer.tests.js b/tests/writers/markdown-writer.tests.js
index a755423..e13046a 100644
--- a/tests/writers/markdown-writer.tests.js
+++ b/tests/writers/markdown-writer.tests.js
@@ -76,6 +76,14 @@ describe('markdown-writer', function() {
writer.close("a");
return assert.equal(writer.asString(), "[Hello]()");
});
+
+ test('elements with IDs have anchor tags with IDs appended to start of markdown element', function() {
+ var writer = mdWriter.writer();
+ writer.open("h1", {id: "start"});
+ writer.text("Hello");
+ writer.close("p");
+ return assert.equal(writer.asString(), '# <a id="start"></a>Hello\n\n');
+ });
test('can generate images', function() {
var writer = mdWriter.writer();