mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-05 16:42:27 +03:00
fix(204): parse blanks and quotes in unique attribute tags (#281)
* feat: add test * chore: update README.md [skip ci] * feat(285): add width and height and alt for img tag (#286) feat: add width and height and alt for img tag * chore: fast-peas-brush.md * chore: working * chore: lexer tests * fix: single atttr tag * fix: single atttr tag
This commit is contained in:
@@ -641,6 +641,28 @@ describe('Parser', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
test('parse url tag with fakeUnique', () => {
|
||||
const ast = parse('[url=https://example.org/ fakeUnique=fakeUnique]T[/url]');
|
||||
|
||||
expect(ast).toBeMatchAST([
|
||||
{
|
||||
tag: 'url',
|
||||
attrs: {
|
||||
'https://example.org/ fakeUnique=fakeUnique': 'https://example.org/ fakeUnique=fakeUnique',
|
||||
},
|
||||
content: ['T'],
|
||||
start: {
|
||||
from: 0,
|
||||
to: 48,
|
||||
},
|
||||
end: {
|
||||
from: 49,
|
||||
to: 55,
|
||||
},
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
test('parse triple nested tags', () => {
|
||||
const ast = parse(`this is outside [spoiler title="name with
|
||||
multiline
|
||||
|
||||
Reference in New Issue
Block a user