mirror of
https://github.com/alecthomas/chroma.git
synced 2025-03-17 20:58:08 +02:00
Add failing test for invalid css with allClasses
This was reported at https://github.com/gohugoio/hugo/issues/7207
This commit is contained in:
parent
6b8ef36ed9
commit
cc5e532d14
@ -222,3 +222,14 @@ func TestReconfigureOptions(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `<pre class="chroma"><span class="nb">echo</span> FOO</pre>`, buf.String())
|
||||
}
|
||||
|
||||
func TestWriteCssWithAllClasses(t *testing.T) {
|
||||
formatter := New()
|
||||
formatter.allClasses = true
|
||||
|
||||
var buf bytes.Buffer
|
||||
err := formatter.WriteCSS(&buf, styles.Fallback)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, buf.String(), ".chroma . {", "Generated css doesn't contain invalid css")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user