mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-25 15:35:13 +00:00
test: add test for multi-line code block
This commit is contained in:
parent
1b4aeb0fe7
commit
f28c9ed86f
1 changed files with 5 additions and 0 deletions
|
@ -151,6 +151,11 @@ describe('code block', () => {
|
||||||
const output = [CODE_BLOCK('abc', null)];
|
const output = [CODE_BLOCK('abc', null)];
|
||||||
assert.deepStrictEqual(parse(input), output);
|
assert.deepStrictEqual(parse(input), output);
|
||||||
});
|
});
|
||||||
|
it('multi line', () => {
|
||||||
|
const input = '```\na\nb\nc\n```';
|
||||||
|
const output = [CODE_BLOCK('a\nb\nc', null)];
|
||||||
|
assert.deepStrictEqual(parse(input), output);
|
||||||
|
});
|
||||||
it('basic (lang)', () => {
|
it('basic (lang)', () => {
|
||||||
const input = '```js\nconst a = 1;\n```';
|
const input = '```js\nconst a = 1;\n```';
|
||||||
const output = [CODE_BLOCK('const a = 1;', 'js')];
|
const output = [CODE_BLOCK('const a = 1;', 'js')];
|
||||||
|
|
Loading…
Reference in a new issue