1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

Convert cdata and text nodes to xast

Ref https://github.com/syntax-tree/xast

More consistent naming and distinction by type looks a bit cleaner.
This commit is contained in:
Bogdan Chadkin
2021-03-10 16:02:37 +03:00
parent 10ac712282
commit c50decb438
9 changed files with 55 additions and 38 deletions

View File

@ -135,7 +135,7 @@ describe('svg2js', function () {
describe('text nodes', function () {
it('should contain preserved whitespace', function () {
const textNode = root.content[3].content[1].content[0].content[1];
return expect(textNode.content[0].text).to.equal(' test ');
return expect(textNode.content[0].value).to.equal(' test ');
});
});