about summary refs log tree commit diff stats
path: root/internal/builder/posts.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-28 16:42:08 +0200
committerAlan Pearce2024-05-28 16:42:08 +0200
commita2e6dd0ec7990b24f11e971462f9cdf1f5dc9fef (patch)
tree293c983c5b0642b475e6c184816f5cd344ae2a87 /internal/builder/posts.go
parent287cfec3d2479415bf3b7069702dbdb8c87b1826 (diff)
downloadwebsite-a2e6dd0ec7990b24f11e971462f9cdf1f5dc9fef.tar.lz
website-a2e6dd0ec7990b24f11e971462f9cdf1f5dc9fef.tar.zst
website-a2e6dd0ec7990b24f11e971462f9cdf1f5dc9fef.zip
Add support for pandoc-style fences
:::{#foo .bar}
text
:::

becomes

<div id="foo" class="bar">
text
</text>
Diffstat (limited to 'internal/builder/posts.go')
-rw-r--r--internal/builder/posts.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/builder/posts.go b/internal/builder/posts.go
index cfe4e6f..deae3e8 100644
--- a/internal/builder/posts.go
+++ b/internal/builder/posts.go
@@ -13,6 +13,7 @@ import (
 	"github.com/adrg/frontmatter"
 	mapset "github.com/deckarep/golang-set/v2"
 	"github.com/pkg/errors"
+	fences "github.com/stefanfritsch/goldmark-fences"
 	"github.com/yuin/goldmark"
 	"github.com/yuin/goldmark/extension"
 	htmlrenderer "github.com/yuin/goldmark/renderer/html"
@@ -46,6 +47,7 @@ var markdown = goldmark.New(
 		extension.GFM,
 		extension.Footnote,
 		extension.Typographer,
+		&fences.Extender{},
 	),
 )