Aggiunto supporto per il markdown alle descrizioni degli item in storia e convertito a YAML

This commit is contained in:
2022-08-28 18:45:45 +02:00
parent 192d8ea944
commit 6cccf78e45
8 changed files with 79 additions and 77 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ func (article *Article) Render() (string, error) {
if article.renderedHTML == "" {
var buf bytes.Buffer
if err := articleMarkdown.Convert([]byte(article.markdownSource), &buf); err != nil {
if err := Markdown.Convert([]byte(article.markdownSource), &buf); err != nil {
return "", err
}
+2 -2
View File
@@ -14,7 +14,7 @@ import (
highlighting "github.com/yuin/goldmark-highlighting"
)
var articleMarkdown goldmark.Markdown
var Markdown goldmark.Markdown
// https://github.com/yuin/goldmark-highlighting/blob/9216f9c5aa010c549cc9fc92bb2593ab299f90d4/highlighting_test.go#L27
func customCodeBlockWrapper(w util.BufWriter, c highlighting.CodeBlockContext, entering bool) {
@@ -35,7 +35,7 @@ func customCodeBlockWrapper(w util.BufWriter, c highlighting.CodeBlockContext, e
}
func init() {
articleMarkdown = goldmark.New(
Markdown = goldmark.New(
goldmark.WithExtensions(
extension.GFM,
extension.Typographer,