Spaces:
Sleeping
Sleeping
Mirror: unbreak subtab clicks (regex had HTML-escaped < in highlightCode)
Browse files- mirror.html +1 -1
mirror.html
CHANGED
|
@@ -594,7 +594,7 @@ function highlightCode(code) {
|
|
| 594 |
.replace(/\b(def|class|if|elif|else|for|while|return|import|from|as|with|try|except|raise|lambda|in|not|and|or|is|None|True|False)\b/g,
|
| 595 |
'<span class="k">$1</span>')
|
| 596 |
.replace(/("[^&]*?")/g, '<span class="s">$1</span>')
|
| 597 |
-
.replace(/(?
|
| 598 |
}
|
| 599 |
|
| 600 |
function divergenceUpdate(userV, userA) {
|
|
|
|
| 594 |
.replace(/\b(def|class|if|elif|else|for|while|return|import|from|as|with|try|except|raise|lambda|in|not|and|or|is|None|True|False)\b/g,
|
| 595 |
'<span class="k">$1</span>')
|
| 596 |
.replace(/("[^&]*?")/g, '<span class="s">$1</span>')
|
| 597 |
+
.replace(/(?<![a-zA-Z_])(\d+)\b/g, '<span class="n">$1</span>');
|
| 598 |
}
|
| 599 |
|
| 600 |
function divergenceUpdate(userV, userA) {
|