File tree 3 files changed +16
-13
lines changed
3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,10 @@ pre {
252
252
background-color : var (--header );
253
253
border-radius : .25rem ;
254
254
line-height : 1.25rem ;
255
+ overflow : auto;
255
256
padding : 1rem ;
257
+ position : relative;
258
+ scrollbar-color : var (--sub ) transparent;
256
259
width : 100% ;
257
260
}
258
261
@@ -296,12 +299,6 @@ p img {
296
299
width : 100% ;
297
300
}
298
301
299
- .lang {
300
- color : var (--sub );
301
- float : right;
302
- user-select : none;
303
- }
304
-
305
302
/** https://github.com/highlightjs/highlight.js/blob/main/src/styles/atom-one-dark.css */
306
303
307
304
.hljs-comment ,
Original file line number Diff line number Diff line change @@ -101,24 +101,26 @@ is a second line.
101
101
``` js
102
102
const hello = " world" ;
103
103
104
- export default async function deez () {
105
- const amogus = " nuts " ;
104
+ export default async function deez (amogusText ) {
105
+ const amogus = ` Hello, ${ amogusText } ! ` ;
106
106
console .log (amogus);
107
107
return amogus;
108
108
}
109
109
```
110
110
111
111
``` py
112
112
class Test :
113
- def __init__ (self ):
113
+ def __init__ (self , text ):
114
114
self .hello = 5
115
+ self .text = f " Hello, { text} . How are you? "
115
116
116
117
117
118
if True :
118
119
if not not True :
119
120
if not False :
120
- test = Test()
121
+ test = Test(" Joe " )
121
122
print (test.hello)
123
+ print (test.text)
122
124
```
123
125
124
126
``` lua
@@ -130,4 +132,9 @@ assert(getmetatable(t) == t1)
130
132
function add (a , b )
131
133
return a + b
132
134
end
135
+
136
+ function main ()
137
+ local x = 5 + 10
138
+ local y = " hello " .. " world"
139
+ end
133
140
```
Original file line number Diff line number Diff line change @@ -48,10 +48,9 @@ export const render = (element) => {
48
48
}
49
49
if ( element . type === "code" ) {
50
50
const lang = element . attributes . className ?. slice ( 9 ) ;
51
- const code = element . children [ 0 ] ;
52
51
return lang === undefined
53
- ? code
54
- : `<span class="lang"> ${ lang } </span> ${ hljs . highlight ( lang , code ) . value } ` ;
52
+ ? `< code> ${ element . children [ 0 ] } </code>`
53
+ : hljs . highlight ( lang , element . children [ 0 ] ) . value ;
55
54
}
56
55
const c = element . children . reduce ( ( a , b ) => a + render ( b ) , "" ) ;
57
56
if ( element . type === null ) {
You can’t perform that action at this time.
0 commit comments