diff options
author | ache <ache@ache.one> | 2019-12-15 19:24:47 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2019-12-15 19:24:47 +0100 |
commit | 1f7a9066bc69292c9f62538c9c042a2df746e0f0 (patch) | |
tree | fc9e41b6dd2e9f244f0684fad1057a4fc2eefb08 /__tests__ | |
parent | Update version (diff) |
Support for custom data attributes
Diffstat (limited to '__tests__')
-rw-r--r-- | __tests__/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/__tests__/index.js b/__tests__/index.js index f6d265e..fd55430 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -182,3 +182,13 @@ This is an awesome code </code></pre>`)); }); +test('global custom attribute', t => { + const renderExtended = generateExtendParser({extends: {image: ['quality']}}); + const extentedString = `*Wait* ! +This is a test image : ![test](img.jpg){data-id=2} +`; + const {contents} = renderExtended(extentedString); + t.deepEqual(parse(contents), parse(`<p><em>Wait</em> ! +This is a test image : <img src="img.jpg" alt="test" data-id="2"></p>`)); +}); + |