summaryrefslogtreecommitdiffstats
path: root/markup/goldmark/goldmark_config/config.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-02-07 18:08:46 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-02-08 19:52:55 +0100
commit2681633db8d340d2dc59cf801419874d572fc704 (patch)
tree74451c9bc4249a387aacf8071127d880cfea07db /markup/goldmark/goldmark_config/config.go
parent1b2472825664763c0b88807b0d193e73553423ec (diff)
markup/goldmark: Add attributes support for blocks (tables etc.)
E.g.: ``` > foo > bar {.myclass} ``` There are some current limitations: For tables you can currently only apply it to the full table, and for lists the ul/ol-nodes only, e.g.: ``` * Fruit * Apple * Orange * Banana {.fruits} * Dairy * Milk * Cheese {.dairies} {.list} ``` Fixes #7548
Diffstat (limited to 'markup/goldmark/goldmark_config/config.go')
-rw-r--r--markup/goldmark/goldmark_config/config.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/markup/goldmark/goldmark_config/config.go b/markup/goldmark/goldmark_config/config.go
index af33e03dc..82b8d9630 100644
--- a/markup/goldmark/goldmark_config/config.go
+++ b/markup/goldmark/goldmark_config/config.go
@@ -37,7 +37,10 @@ var Default = Config{
Parser: Parser{
AutoHeadingID: true,
AutoHeadingIDType: AutoHeadingIDTypeGitHub,
- Attribute: true,
+ Attribute: ParserAttribute{
+ Title: true,
+ Block: false,
+ },
},
}
@@ -82,5 +85,12 @@ type Parser struct {
AutoHeadingIDType string
// Enables custom attributes.
- Attribute bool
+ Attribute ParserAttribute
+}
+
+type ParserAttribute struct {
+ // Enables custom attributes for titles.
+ Title bool
+ // Enables custom attributeds for blocks.
+ Block bool
}