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:
Bjørn Erik Pedersen
2024-12-25 18:20:16 +01:00
parent 845b8885de
commit ec0caaec7c
3 changed files with 35 additions and 3 deletions

View File

@@ -45,13 +45,18 @@ var DefaultConfig = Config{
NoClasses: true,
LineNumbersInTable: true,
TabWidth: 4,
WrapperClass: "highlight",
}
type Config struct {
Style string
// Enable syntax highlighting of fenced code blocks.
CodeFences bool
// The class or classes to use for the outermost element of the highlighted code.
WrapperClass string
// Use inline CSS styles.
NoClasses bool