mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
markup/goldmark: Add the Hugo Goldmark Extras "delete" extension
With Goldmark v1.7.1 and earlier, the Goldmark "strikethrough" extension was triggered by wrapping text within a pair of double-tilde characters. With Goldmark v1.7.2 and later, to provide full GFM compatibility, the Goldmark "strikethrough" extension is triggered by wrapping text within a pair of single- or double-tilde characters. This change created a conflict with the Hugo Goldmark Extras "subscript" extension. When enabling the Hugo Goldmark Extras "subscript" extension, if you want to render subscript and strikethrough text concurrently, you must: 1. Disable the Goldmark "strikethrough" extension 2. Enable the Hugo Goldmark Extras "delete" extension Closes #12597
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
ad6d91cabd
commit
8efc75b73f
@@ -50,10 +50,7 @@ var Default = Config{
|
||||
EscapedSpace: false,
|
||||
},
|
||||
Extras: Extras{
|
||||
Superscript: Superscript{
|
||||
Enable: false,
|
||||
},
|
||||
Subscript: Subscript{
|
||||
Delete: Delete{
|
||||
Enable: false,
|
||||
},
|
||||
Insert: Insert{
|
||||
@@ -62,6 +59,12 @@ var Default = Config{
|
||||
Mark: Mark{
|
||||
Enable: false,
|
||||
},
|
||||
Subscript: Subscript{
|
||||
Enable: false,
|
||||
},
|
||||
Superscript: Superscript{
|
||||
Enable: false,
|
||||
},
|
||||
},
|
||||
Passthrough: Passthrough{
|
||||
Enable: false,
|
||||
@@ -168,12 +171,17 @@ type Typographer struct {
|
||||
// Extras holds extras configuration.
|
||||
// github.com/hugoio/hugo-goldmark-extensions/extras
|
||||
type Extras struct {
|
||||
Delete Delete
|
||||
Insert Insert
|
||||
Mark Mark
|
||||
Subscript Subscript
|
||||
Superscript Superscript
|
||||
}
|
||||
|
||||
type Delete struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
type Insert struct {
|
||||
Enable bool
|
||||
}
|
||||
|
Reference in New Issue
Block a user