Improve consistency of font weights in code samples

parent 79280208
......@@ -64,7 +64,7 @@ while (codeMatch !== null) {
} else {
// Single language. Highlight it.
const highlightedCode = highlightJs.highlight(language, unescapeHtml(code)).value
index = index.replace(fullMatch, `<code>${unescapeReplacementString(highlightedCode)}</code>`)
index = index.replace(fullMatch, `<code style='font-weight: 100;'>${unescapeReplacementString(highlightedCode)}</code>`)
}
// Update the conditional for the next check of the loop.
......
......@@ -527,7 +527,7 @@ module.exports = (request, response) => {
const showMessage = message =&gt; {
const list = document.querySelector("#messageList")
list.innerHTML += `&lt;li&gt;&lt;strong&gt;${message.text}&lt;/strong&gt;&lt;/li&gt;`
list.innerHTML += `&lt;li&gt;${message.text}&lt;/li&gt;`
}
socket.onmessage = message =&gt; {
......@@ -561,7 +561,7 @@ module.exports = (request, response) => {
const showMessage = message =&gt; {
const list = document.querySelector("#messageList")
list.innerHTML += `&lt;li&gt;&lt;strong&gt;${message.text}&lt;/strong&gt;&lt;/li&gt;`
list.innerHTML += `&lt;li&gt;${message.text}&lt;/li&gt;`
}
socket.onmessage = message =&gt; {
......@@ -683,7 +683,7 @@ module.exports = (request, response) => {
const showMessage = message =&gt; {
const list = document.querySelector("#messageList")
list.innerHTML += `&lt;li&gt;&lt;strong&gt;${message.text}&lt;/strong&gt;&lt;/li&gt;`
list.innerHTML += `&lt;li&gt;${message.text}&lt;/li&gt;`
}
</span><span class='language-js strong'>socket.onmessage = websocketMessage => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment