arche-highlight 0.8.0 → 0.9.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.es.js +4 -1
- package/ArcheHighlight.js +4 -1
- package/ArcheHighlight.mjs +4 -1
- package/package.json +1 -1
package/ArcheHighlight.es.js
CHANGED
|
@@ -219,7 +219,7 @@ function parseJavaScript(text) {
|
|
|
219
219
|
parsedElements.push(c)
|
|
220
220
|
term = ""
|
|
221
221
|
index += 1
|
|
222
|
-
} else if (term == "import" || term == "new" || term == "async" || term == "await" || term == "for" || term == "while" || term == "of" || term == "from") {
|
|
222
|
+
} else if (term == "import" || term == "new" || term == "async" || term == "await" || term == "if" || term == "for" || term == "while" || term == "of" || term == "from" || term == "try" || term == "catch") {
|
|
223
223
|
parsedElements.push(Span({ class: "keyword" }, term))
|
|
224
224
|
parsedElements.push(c)
|
|
225
225
|
term = ""
|
|
@@ -268,6 +268,9 @@ function parseJavaScript(text) {
|
|
|
268
268
|
}
|
|
269
269
|
term = ""
|
|
270
270
|
} else if (c === "(") {
|
|
271
|
+
if (isFunctionDeclaration) {
|
|
272
|
+
isFunctionDeclaration = false
|
|
273
|
+
}
|
|
271
274
|
if (term === "") {
|
|
272
275
|
// skip
|
|
273
276
|
} else if (term == "require" || term == "isNaN") {
|
package/ArcheHighlight.js
CHANGED
|
@@ -219,7 +219,7 @@ function parseJavaScript(text) {
|
|
|
219
219
|
parsedElements.push(c)
|
|
220
220
|
term = ""
|
|
221
221
|
index += 1
|
|
222
|
-
} else if (term == "import" || term == "new" || term == "async" || term == "await" || term == "if" || term == "for" || term == "while" || term == "of" || term == "from") {
|
|
222
|
+
} else if (term == "import" || term == "new" || term == "async" || term == "await" || term == "if" || term == "for" || term == "while" || term == "of" || term == "from" || term == "try" || term == "catch") {
|
|
223
223
|
parsedElements.push(Span({ class: "keyword" }, term))
|
|
224
224
|
parsedElements.push(c)
|
|
225
225
|
term = ""
|
|
@@ -268,6 +268,9 @@ function parseJavaScript(text) {
|
|
|
268
268
|
}
|
|
269
269
|
term = ""
|
|
270
270
|
} else if (c === "(") {
|
|
271
|
+
if (isFunctionDeclaration) {
|
|
272
|
+
isFunctionDeclaration = false
|
|
273
|
+
}
|
|
271
274
|
if (term === "") {
|
|
272
275
|
// skip
|
|
273
276
|
} else if (term == "require" || term == "isNaN") {
|
package/ArcheHighlight.mjs
CHANGED
|
@@ -219,7 +219,7 @@ function parseJavaScript(text) {
|
|
|
219
219
|
parsedElements.push(c)
|
|
220
220
|
term = ""
|
|
221
221
|
index += 1
|
|
222
|
-
} else if (term == "import" || term == "new" || term == "async" || term == "await" || term == "for" || term == "while" || term == "of" || term == "from") {
|
|
222
|
+
} else if (term == "import" || term == "new" || term == "async" || term == "await" || term == "if" || term == "for" || term == "while" || term == "of" || term == "from" || term == "try" || term == "catch") {
|
|
223
223
|
parsedElements.push(Span({ class: "keyword" }, term))
|
|
224
224
|
parsedElements.push(c)
|
|
225
225
|
term = ""
|
|
@@ -268,6 +268,9 @@ function parseJavaScript(text) {
|
|
|
268
268
|
}
|
|
269
269
|
term = ""
|
|
270
270
|
} else if (c === "(") {
|
|
271
|
+
if (isFunctionDeclaration) {
|
|
272
|
+
isFunctionDeclaration = false
|
|
273
|
+
}
|
|
271
274
|
if (term === "") {
|
|
272
275
|
// skip
|
|
273
276
|
} else if (term == "require" || term == "isNaN") {
|