2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-08 17:22:26 +03:00

refactor(parser): better jsdoc, some behavior fixes, more tests

— all operations on nodes moved to `createList` function
- fixed problem with single tags with value only like `[url=value]` fixes #6
- write tests for `Token` class
- moved all node arrays to parse func, now parser supports many instances
- add jsdoc to critical parts of the parser to better understanding how it works
This commit is contained in:
Nikolay Kostyurin
2019-03-04 02:24:12 +02:00
parent ef6a778f45
commit 8cb1d495dd
7 changed files with 379 additions and 220 deletions
-4
View File
@@ -41,10 +41,6 @@ const getTagName = (token) => {
const convertTagToText = (token) => {
let text = OPEN_BRAKET;
if (isTagEnd(token)) {
text += SLASH;
}
text += getTokenValue(token);
text += CLOSE_BRAKET;