2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-14 18:42:24 +03:00

feat(preset-html5): color tag #189, case insensitive tags #190 (#191)

* fix(preset-html5): add color tag #189

* fix(parser): case insensitive tags bug #190
This commit is contained in:
Nikolay Kost
2023-09-28 04:02:52 +03:00
committed by GitHub
parent 3bccca086f
commit 0c78831372
5 changed files with 58 additions and 2 deletions
+22
View File
@@ -141,6 +141,28 @@ describe('Parser', () => {
expectOutput(ast, output);
});
test('parse only allowed tags case insensitive', () => {
const ast = parse('[h1 name=value]Foo [Bar] [/h1]', {
onlyAllowTags: ['H1']
});
const output = [
{
tag: 'h1',
attrs: {
name: 'value',
},
content: [
'Foo',
' ',
'[Bar]',
' '
],
},
];
expectOutput(ast, output);
});
})
describe('contextFreeTags', () => {