arche-highlight 0.5.6 → 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/LICENSE ADDED
@@ -0,0 +1,5 @@
1
+ The CLOUŢ Free and Open Source Software License (CFOSS)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.
4
+
5
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE, OR IN THE USE OF OR OTHER DEALINGS OF THE SOFTWARE.
package/README.md CHANGED
@@ -86,3 +86,19 @@ The following JavaScript classes are added to the code as `span` elements of the
86
86
  * `null` - the `null` object.
87
87
  * `boolean` - booleans `true` and `false`.
88
88
  * `not-a-number` - the special numeric value `NaN` that represents an undefined or unrepresentable number, for example `0 / 0`.
89
+
90
+ ## Example
91
+ Please find a runnable example in the `example` directory. You can run the example with a static web server such as [Static Web Server](https://static-web-server.net/).
92
+ ```sh
93
+ static-web-server --port=8080 --root=./example -e=false
94
+ ```
95
+
96
+ ## License
97
+ ArcheHTML is distributed under the [CFOSS License](https://cloutsworld.com/en-us/legal/license/cfoss).
98
+
99
+ ## Support
100
+ * minimum Node.js version: 16
101
+ * minimum Chrome version: 63
102
+ * minimum Firefox version: 57
103
+ * minimum Edge version: 79
104
+ * minimum Safari version: 11.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arche-highlight",
3
- "version": "0.5.6",
3
+ "version": "0.6.1",
4
4
  "description": "Syntax highlighting for vanilla microfrontends",
5
5
  "author": "Richard Tong",
6
6
  "license": "CFOSS",