Aggiunto supporto per il markdown alle descrizioni degli item in storia e convertito a YAML
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user