htmv 0.0.38 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/parser.js +6 -4
- package/package.json +1 -1
package/dist/compiler/parser.js
CHANGED
|
@@ -109,6 +109,10 @@ export function parse(tokens) {
|
|
|
109
109
|
for (let i = 0; i < args.length; i++) {
|
|
110
110
|
const letter = args[i];
|
|
111
111
|
if (letter === "{") {
|
|
112
|
+
tokens.push({
|
|
113
|
+
type: "text",
|
|
114
|
+
text: textBuffer,
|
|
115
|
+
});
|
|
112
116
|
clearBuffer();
|
|
113
117
|
continue;
|
|
114
118
|
}
|
|
@@ -121,12 +125,10 @@ export function parse(tokens) {
|
|
|
121
125
|
}
|
|
122
126
|
textBuffer += letter;
|
|
123
127
|
}
|
|
128
|
+
clearBuffer();
|
|
124
129
|
function clearBuffer() {
|
|
125
130
|
if (textBuffer.length > 0) {
|
|
126
|
-
|
|
127
|
-
type: "text",
|
|
128
|
-
text: textBuffer,
|
|
129
|
-
});
|
|
131
|
+
textBuffer = "";
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|