aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2020-05-05 01:13:31 +0200
committerache <ache@ache.one>2020-05-05 01:13:31 +0200
commitb6f2b3f602bd25b94878f73b91e18f69e3d4b46f (patch)
treedd6ae4ff5095d1a597303213fd38dceaa1d5d2d0
parentNew version (diff)
Add atx header inline test
-rw-r--r--__tests__/index.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/__tests__/index.js b/__tests__/index.js
index 6cfa471..cf61dfa 100644
--- a/__tests__/index.js
+++ b/__tests__/index.js
@@ -128,7 +128,7 @@ test('link', t => {
t.deepEqual(parse(contents), parse('<p>This is a link :<a href="ache.one" ping="http://ache.one/big.brother">Test link</a></p>'));
});
-test('atx header', t => {
+test('header', t => {
const imageMd = `
Title of the article
====================
@@ -139,6 +139,25 @@ Title of the article
t.deepEqual(parse(contents), parse('<h1 data-id="title">Title of the article</h1>'));
});
+test('atx header', t => {
+ const imageMd = `
+# Title of the article
+{data-id="title"}
+
+`;
+ const {contents} = renderDefault(imageMd);
+ t.deepEqual(parse(contents), parse('<h1 data-id="title">Title of the article</h1>'));
+});
+
+test('atx header inline', t => {
+ const imageMd = `
+# Title of the article {data-id="title"}
+
+`;
+ const {contents} = renderDefault(imageMd);
+ t.deepEqual(parse(contents), parse('<h1 data-id="title">Title of the article</h1>'));
+});
+
test('emphasis and strong', t => {
const emphasis = 'Hey ! *That looks cool*{style="color: blue;"} ! No, that\'s **not**{.not} !';
const {contents} = renderDefault(emphasis);