mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
markup/highlight: Add wrapperClass option
The need comes from Tailwind's typography plugin. There's currently no way to turn that off outside of the markup, see https://github.com/tailwindlabs/tailwindcss-typography/pull/363
This commit is contained in:
@@ -103,3 +103,29 @@ xəx := 0
|
||||
<span class="nx">xəx</span>
|
||||
`)
|
||||
}
|
||||
|
||||
func TestHighlightClass(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- config.toml --
|
||||
[markup.highlight]
|
||||
noClasses = false
|
||||
wrapperClass = "highlight no-prose"
|
||||
-- content/_index.md --
|
||||
---
|
||||
title: home
|
||||
---
|
||||
§§§go
|
||||
xəx := 0
|
||||
§§§
|
||||
-- layouts/index.html --
|
||||
{{ .Content }}
|
||||
`
|
||||
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/index.html", `
|
||||
<div class="highlight no-prose"><pre
|
||||
`)
|
||||
}
|
||||
|
Reference in New Issue
Block a user