sugar-high 0.4.3 → 0.4.4

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.
Files changed (2) hide show
  1. package/lib/index.mjs +4 -6
  2. package/package.json +1 -1
package/lib/index.mjs CHANGED
@@ -259,27 +259,25 @@ export function tokenize(code) {
259
259
  continue
260
260
  }
261
261
 
262
-
263
262
  if (!inStrTemplateLiterals()) {
264
- if (prev !== '\\n' && curr === '`') {
263
+ if (prev !== '\\n' && isStrTemplateChr(curr)) {
265
264
  append()
266
- append(T_SIGN, curr)
265
+ append(T_STRING, curr)
267
266
  __strTemplateQuoteStack++
268
267
  continue
269
268
  }
270
269
  }
271
270
 
272
271
  if (inStrTemplateLiterals()) {
273
- if (prev !== '\\n' && curr === '`') {
272
+ if (prev !== '\\n' && isStrTemplateChr(curr)) {
274
273
  if (__strTemplateQuoteStack > 0) {
275
274
  append()
276
275
  __strTemplateQuoteStack--
277
- append(T_SIGN, curr)
276
+ append(T_STRING, curr)
278
277
  continue
279
278
  }
280
279
  }
281
280
 
282
-
283
281
  if (c_n === '${') {
284
282
  __strTemplateExprStack++
285
283
  append(T_STRING)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sugar-high",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "exports": "./lib/index.mjs",
6
6
  "description": "Super lightweight JSX syntax highlighter",