mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
markup/goldmark: Support extras extension
Enables inclusion of these HTML elements in Markdown: - Inserted Text (++inserted++) - Mark Text (==marked==) - Subscript (H~2~O) - Superscript (1^st^)
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
b1bf0bff2c
commit
ca9a77ef92
@@ -49,6 +49,20 @@ var Default = Config{
|
||||
EastAsianLineBreaksStyle: "simple",
|
||||
EscapedSpace: false,
|
||||
},
|
||||
Extras: Extras{
|
||||
Superscript: Superscript{
|
||||
Enable: false,
|
||||
},
|
||||
Subscript: Subscript{
|
||||
Enable: false,
|
||||
},
|
||||
Insert: Insert{
|
||||
Enable: false,
|
||||
},
|
||||
Mark: Mark{
|
||||
Enable: false,
|
||||
},
|
||||
},
|
||||
Passthrough: Passthrough{
|
||||
Enable: false,
|
||||
Delimiters: DelimitersConfig{
|
||||
@@ -112,6 +126,7 @@ type Extensions struct {
|
||||
Typographer Typographer
|
||||
Footnote bool
|
||||
DefinitionList bool
|
||||
Extras Extras
|
||||
Passthrough Passthrough
|
||||
|
||||
// GitHub flavored markdown
|
||||
@@ -150,7 +165,32 @@ type Typographer struct {
|
||||
Apostrophe string
|
||||
}
|
||||
|
||||
// Passthrough hold passthrough configuration.
|
||||
// Extras holds extras configuration.
|
||||
// github.com/hugoio/hugo-goldmark-extensions/extras
|
||||
type Extras struct {
|
||||
Insert Insert
|
||||
Mark Mark
|
||||
Subscript Subscript
|
||||
Superscript Superscript
|
||||
}
|
||||
|
||||
type Insert struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
type Mark struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
type Subscript struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
type Superscript struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
// Passthrough holds passthrough configuration.
|
||||
// github.com/hugoio/hugo-goldmark-extensions/passthrough
|
||||
type Passthrough struct {
|
||||
// Whether to enable the extension
|
||||
|
Reference in New Issue
Block a user