Skip to content

Commit c632ce4

Browse files
committed
Code area for plaintext
1 parent 6c286c9 commit c632ce4

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

example/index.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,6 @@ int main(){
8989
}
9090
```
9191

92-
```c=
93-
#include<stdio.h>
94-
int main(){
95-
printf("hello\n");
96-
return 0;
97-
}
98-
```
99-
10092
```go=
10193
package main
10294
@@ -118,6 +110,10 @@ func main() {
118110
}
119111
```
120112

113+
```
114+
plaintext
115+
```
116+
121117
## Abbr
122118

123119
*[HTML]: Hyper Text Markup Language

layout.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@
211211
margin: 0px;
212212
padding: 0px;
213213
overflow-x: auto;
214+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
215+
font-size: 0.85rem;
216+
color: #444;
214217
}
215218

216219
mark {
@@ -223,15 +226,8 @@
223226
}
224227

225228
/*---hljs---*/
226-
.hljs {
227-
background: #f0f0f0;
228-
color: #444;
229-
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
230-
font-size: 0.85rem;
231-
}
232-
233229
.hljs-comment {
234-
color: #888
230+
color: #708090;
235231
}
236232

237233
.hljs-punctuation,
@@ -349,6 +345,7 @@
349345
<script
350346
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/highlightjs-line-numbers.min.js"></script>
351347
<script>
348+
// https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
352349
document.querySelectorAll('code').forEach((dom) => {
353350
let lang = dom.className.match(/language\-([^=]*)?(=?)$/);
354351
if (lang[1]) {

0 commit comments

Comments
 (0)