2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00

fix(plugin-helper): better handle content of TagNode

This commit is contained in:
Nikolay Kostyurin
2018-09-24 00:30:46 +02:00
parent e3c2a2f4dd
commit 505152bf4c
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ class TagNode {
constructor(tag, attrs, content) {
this.tag = tag;
this.attrs = attrs;
this.content = content;
this.content = [].concat(content);
}
attr(name, value) {
@@ -4,6 +4,7 @@ import {
getNodeLength,
isTagNode,
isStringNode,
isEOL,
} from '../src';
describe('@bbob/plugin-helper', () => {
@@ -65,4 +66,8 @@ describe('@bbob/plugin-helper', () => {
expect(attrValue('test', attrs)).toBe('test="{"tag":"test"}"');
});
test('isEOL', () => {
expect(isEOL('\n')).toBe(true)
})
});