2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-11 18:02:26 +03:00

fix(296): parse with lost repeated closing tag (#297)

* fix: extract node list ot separate file, fix nested parsing

* chore:  node list tests

* fix: nested tags parsing

* chore: changeset

* chore: remove unused files

* chore: disable publish on every commit
This commit is contained in:
Nikolay Kost
2025-10-14 04:11:19 +02:00
committed by GitHub
parent 40041a0680
commit 29f909a589
7 changed files with 183 additions and 77 deletions
+30
View File
@@ -962,6 +962,36 @@ sdfasdfasdf
);
});
test('parse with lost repeated closing tag', () => {
const input = parse('Hello World[u]Wrong underline[u] This is another text [u]and this, too[/u]');
expect(input).toBeMatchAST([
'Hello',
' ',
'World',
'[u]',
'Wrong',
' ',
'underline',
'[u]',
' ',
'This',
' ',
'is',
' ',
'another',
' ',
'text',
' ',
{
tag: 'u',
attrs: {},
content: ['and', ' ', 'this,', ' ', 'too'],
}
]);
});
test('parse with url in tag content', () => {
const input = parse('[img]https://tw.greywool.com/i/e3Ph5.png[/img]');