mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00: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:
		| @@ -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 | ||||
| 							} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user