arche-highlight 0.2.0 → 0.3.0

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/ArcheHighlight.js CHANGED
@@ -23,8 +23,8 @@ function testOperator(term) {
23
23
  return term == "+" || term == "-" || term == "*" || term == "/" || term == "**" || term == "=" || term == "+=" || term == "++" || term == "-=" || term == "*=" || term == "/=" || term == "**=" || term == "==" || term == "===" || term == "!=" || term == "!==" || term == ">" || term == ">=" || term == "<" || term == "<=" || term == "?" || term == ":" || term == "&&" || term == "||" || term == "??" || term == "&" || term == "|" || term == "^" || term == "~" || term == ">>" || term == "<<" || term == "&=" || term == "|=" || term == "^="
24
24
  }
25
25
 
26
- // pushWordTerm(parsedElements Array<object|string>, term string, index number, text string) -> ()
27
- function pushWordTerm(parsedElements, term, index, text) {
26
+ // pushWordTerm(parsedElements Array<object|string>, term string) -> ()
27
+ function pushWordTerm(parsedElements, term) {
28
28
  if (term == "process" || term == "require" || term == "console" || term == "window" || term == "global" || term == "globalThis" || term == "isNaN") {
29
29
  parsedElements.push(Span({ class: "global-object" }, term))
30
30
  } else if (term == "undefined") {
@@ -36,16 +36,7 @@ function pushWordTerm(parsedElements, term, index, text) {
36
36
  } else if (term == "NaN") {
37
37
  parsedElements.push(Span({ class: "not-a-number" }, term))
38
38
  } else {
39
- let c = text[index]
40
- while (c === " " || c === "\n") {
41
- index += 1
42
- c = text[index]
43
- }
44
- if (c === "(") {
45
- parsedElements.push(Span({ class: "function-name" }, term))
46
- } else {
47
- parsedElements.push(term)
48
- }
39
+ parsedElements.push(term)
49
40
  }
50
41
  }
51
42
 
package/README.md CHANGED
@@ -1,2 +1,2 @@
1
1
  # ArcheHighlight
2
- Syntax highlighting for [vanilla microfrontends](https://arche.gallery/)
2
+ Syntax highlighting for [vanilla microfrontends](https://arche.gallery/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arche-highlight",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Syntax highlighting for vanilla microfrontends",
5
5
  "author": "Richard Tong",
6
6
  "license": "CFOSS",