mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-14 18:42:24 +03:00
* fix(preset-html5): add color tag #189 * fix(parser): case insensitive tags bug #190
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user