diff options
author | ache <ache@ache.one> | 2020-05-06 04:50:08 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2020-05-06 04:50:08 +0200 |
commit | fd985c42d9905cd2f97181060134b498bfe8a001 (patch) | |
tree | de0f5dc6f22c8b81feb4c3dc75b0c8225f20d6d1 | |
parent | Update package-lock (diff) |
More atx header error tests
-rw-r--r-- | __tests__/index.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/__tests__/index.js b/__tests__/index.js index 602da53..d67170f 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -177,6 +177,33 @@ Title of the article {data-id="title"} t.deepEqual(parse(contents), parse('<h1>Title of the article {data-id="title"}</h1>')); }); +test('not atx header inline', t => { + const atxHeaderMd = ` +# {data-id="title"} + +`; + const {contents} = renderDefault(atxHeaderMd); + t.deepEqual(parse(contents), parse('<h1>{data-id="title"}</h1>')); +}); + +test('not atx header inline 2', t => { + const atxHeaderMd = ` +# Header {data-id="title" + +`; + const {contents} = renderDefault(atxHeaderMd); + t.deepEqual(parse(contents), parse('<h1>Header {data-id="title"</h1>')); +}); + +test('not atx header inline 3', t => { + const atxHeaderMd = ` +# Header data-id="title"} + +`; + const {contents} = renderDefault(atxHeaderMd); + t.deepEqual(parse(contents), parse('<h1>Header data-id="title"}</h1>')); +}); + test('emphasis and strong', t => { const emphasis = 'Hey ! *That looks cool*{style="color: blue;"} ! No, that\'s **not**{.not} !'; const {contents} = renderDefault(emphasis); |