sugar-high 0.4.4 → 0.4.5

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped
5
5
 
6
- ![img](https://repository-images.githubusercontent.com/453236442/94994be5-72fa-479f-8b87-2dc14fe40329)
6
+ ![img](https://repository-images.githubusercontent.com/453236442/1d63a6ff-aa11-422c-a36c-ca16fc102f18)
7
7
 
8
8
  ### Usage
9
9
 
package/lib/index.mjs CHANGED
@@ -319,7 +319,8 @@ export function tokenize(code) {
319
319
  }
320
320
  if (__jsxTag) {
321
321
  // >: open tag close sign or closing tag closing sign
322
- if (curr === '>' && prev !== '/') {
322
+ // and it's not `=>` or `/>`
323
+ if (curr === '>' && !'/='.includes(prev)) {
323
324
  append()
324
325
  if (__jsxTag === 1) {
325
326
  __jsxTag = 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sugar-high",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "type": "module",
5
5
  "exports": "./lib/index.mjs",
6
6
  "description": "Super lightweight JSX syntax highlighter",