swlkr / janetdocs

A community documentation site for the janet programming language
https://janetdocs.com
MIT License
34 stars 9 forks source link

fix highlighting in editor preview #31

Closed Krasjet closed 3 years ago

Krasjet commented 3 years ago

This should close #14 and #29.

I have tested locally that this hotfix does solve the issue.

Krasjet commented 3 years ago

GitHub's diff freaks out on minified js. The actual diff is the following

@@ -889,7 +889,7 @@
             break;
           case "text":
             var i = this.evaluateReturnExpression(a, h, c);
-            void 0 === i && h.match(/\./).length && (i = ""), a.innerText = i;
+            void 0 === i && h.match(/\./).length && (i = ""), a.textContent = i;
             break;
           case "html":
             a.innerHTML = this.evaluateReturnExpression(a, h, c);
swlkr commented 3 years ago

LGTM! The beauty of inline alpine is we don't have to care if they fixed it upstream 😂

But to be a good open source sport, I think they did fix this, but we'll use this patch for now