aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/code.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/code.js b/docs/code.js
index 599068e..a28f908 100644
--- a/docs/code.js
+++ b/docs/code.js
@@ -5,12 +5,16 @@
const term = (t) =>
t
.replaceAll(
- /(?<!\([+-]\d*\.?\d*)(?<![a-z][^&; ]*)(?<!["'])([0-9])/g,
+ /(?<!\([+-]\d*\.?\d*\+?\d*\.?\d*)(?<![a-z][^&; ]*)(?<!["'])([0-9])/g,
"<span class='index'>$1</span>",
)
.replaceAll(/'([^\'])'/g, "<span class='string'>'$1'</span>")
.replaceAll(/"([^\"]*)"/g, "<span class='string'>\"$1\"</span>")
.replaceAll(
+ /(\([+-][0-9]+\.[0-9]+[+-][0-9]+\.[0-9]+i\))/g,
+ "<span class='number'>$1</span>",
+ )
+ .replaceAll(
/(\([+-][0-9]+\.[0-9]+[qr]?\))/g,
"<span class='number'>$1</span>",
)