arche-highlight 0.6.0 → 0.6.1

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.
@@ -337,7 +337,11 @@ function parseJavaScript(text) {
337
337
  }
338
338
 
339
339
  if (term.length > 0) {
340
- pushWordTerm(parsedElements, term, index, text)
340
+ if (isSingleLineComment) {
341
+ parsedElements.push(Span({ class: "comment" }, term))
342
+ } else {
343
+ pushWordTerm(parsedElements, term, index, text)
344
+ }
341
345
  }
342
346
 
343
347
  return parsedElements
package/ArcheHighlight.js CHANGED
@@ -343,7 +343,11 @@ function parseJavaScript(text) {
343
343
  }
344
344
 
345
345
  if (term.length > 0) {
346
- pushWordTerm(parsedElements, term, index, text)
346
+ if (isSingleLineComment) {
347
+ parsedElements.push(Span({ class: "comment" }, term))
348
+ } else {
349
+ pushWordTerm(parsedElements, term, index, text)
350
+ }
347
351
  }
348
352
 
349
353
  return parsedElements
@@ -337,7 +337,11 @@ function parseJavaScript(text) {
337
337
  }
338
338
 
339
339
  if (term.length > 0) {
340
- pushWordTerm(parsedElements, term, index, text)
340
+ if (isSingleLineComment) {
341
+ parsedElements.push(Span({ class: "comment" }, term))
342
+ } else {
343
+ pushWordTerm(parsedElements, term, index, text)
344
+ }
341
345
  }
342
346
 
343
347
  return parsedElements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arche-highlight",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Syntax highlighting for vanilla microfrontends",
5
5
  "author": "Richard Tong",
6
6
  "license": "CFOSS",