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.
@@ -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
- tokens.push({
127
- type: "text",
128
- text: textBuffer,
129
- });
131
+ textBuffer = "";
130
132
  }
131
133
  }
132
134
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "htmv",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.38",
5
+ "version": "0.0.40",
6
6
  "devDependencies": {
7
7
  "@biomejs/biome": "2.3.3",
8
8
  "@types/bun": "latest"