Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

comments

Tj Holowaychukbebeb35fd107
diff --git a/highlight.js b/highlight.js
index c7c15560..6df4a8d7 100644
--- a/highlight.js
+++ b/highlight.js
@@ -9,6 +9,7 @@ function highlight(js) {
return js
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
+ .replace(/\/\/(.*)/gm, '<span class="comment">//$1</span>')
.replace(/('.*')/gm, '<span class="string">$1</span>')
.replace(/(\d+\.\d+)/gm, '<span class="number">$1</span>')
.replace(/(\d+)/gm, '<span class="number">$1</span>')
diff --git a/style.css b/style.css
index be823990..aaba1d4a 100644
--- a/style.css
+++ b/style.css
@@ -173,6 +173,7 @@ footer span {
}
}
+code .comment { color: #ddd }
code .init { color: #2F6FAD }
code .string { color: #5890AD }
code .keyword { color: #8A6343 }