diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-08 20:22:55 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-08 20:22:55 +0000 |
| commit | deee500761d499d4ea50d3e75b1f626268879527 (patch) | |
| tree | 0af943a1089e0b3549a617a663da6735fdf38360 /tests | |
| parent | de53ae77d8696ef9a8c89fc9661c1fb1acdd1ce1 (diff) | |
Ignore anchor tags if href is not set
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/writers/markdown-writer.tests.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/writers/markdown-writer.tests.js b/tests/writers/markdown-writer.tests.js index 9d3def5..fbf1e61 100644 --- a/tests/writers/markdown-writer.tests.js +++ b/tests/writers/markdown-writer.tests.js @@ -75,22 +75,14 @@ describe('markdown-writer', function() { return assert.equal(writer.asString(), "[Hello](http://example.com)"); }); - test('can generate hyperlinks with missing href attribute', function() { - var writer = mdWriter.writer(); - writer.open("a", {}); - writer.text("Hello"); - writer.close("a"); - return assert.equal(writer.asString(), "[Hello]()"); - }); - - test('can generate hyperlinks with empty attributes', function() { + test('anchor tags without href attribute are treated as ordinary text', function() { var writer = mdWriter.writer(); writer.open("a"); writer.text("Hello"); writer.close("a"); - return assert.equal(writer.asString(), "[Hello]()"); + 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"}); |
