File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ var (
131
131
}
132
132
defaultPreWrapper = preWrapper {
133
133
start : func (code bool , styleAttr string ) string {
134
- return fmt .Sprintf (" <pre%s>" , styleAttr )
134
+ return fmt .Sprintf (` <pre tabindex="0" %s>` , styleAttr )
135
135
},
136
136
end : func (code bool ) string {
137
137
return "</pre>"
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ func TestWithPreWrapper(t *testing.T) {
202
202
203
203
t .Run ("Regular" , func (t * testing.T ) {
204
204
s := format (New (WithClasses (true )))
205
- assert .Equal (t , s , `<pre class="chroma"><span class="nb">echo</span> FOO</pre>` )
205
+ assert .Equal (t , s , `<pre tabindex="0" class="chroma"><span class="nb">echo</span> FOO</pre>` )
206
206
})
207
207
208
208
t .Run ("PreventSurroundingPre" , func (t * testing.T ) {
@@ -246,7 +246,7 @@ func TestReconfigureOptions(t *testing.T) {
246
246
err = f .Format (& buf , styles .Fallback , it )
247
247
248
248
assert .NoError (t , err )
249
- assert .Equal (t , `<pre class="chroma"><span class="nb">echo</span> FOO</pre>` , buf .String ())
249
+ assert .Equal (t , `<pre tabindex="0" class="chroma"><span class="nb">echo</span> FOO</pre>` , buf .String ())
250
250
}
251
251
252
252
func TestWriteCssWithAllClasses (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments