mirror of
https://github.com/go-gitea/gitea.git
synced 2025-03-23 06:25:44 +01:00
Fix inconsistent rendering of block mathematical expressions (#29677)
Fix #28735 GitHub render `\```math\``` ` as a block now. Add `display` class will render it as a block. After:   --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
3c6fc25a77
commit
8fc1a8f0eb
@ -104,7 +104,8 @@ func SpecializedMarkdown() goldmark.Markdown {
|
||||
}
|
||||
|
||||
// include language-x class as part of commonmark spec
|
||||
_, err = w.WriteString(`<code class="chroma language-` + string(language) + `">`)
|
||||
// the "display" class is used by "js/markup/math.js" to render the code element as a block
|
||||
_, err = w.WriteString(`<code class="chroma language-` + string(language) + ` display">`)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user