1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-07 02:57:20 +00:00

Fix slight bug in katex (#21171)

There is a small bug in #20571 whereby `$a a$b b$` will not be correctly
detected as a math inline block of `a a$b b`. This PR fixes this.

Also reenable test cases as per #21340 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
zeripath
2022-10-05 19:55:36 +01:00
committed by GitHub
parent 2d2cf589f7
commit 93df41f506
7 changed files with 153 additions and 69 deletions

View File

@ -88,7 +88,9 @@ func ExtractMetadataBytes(contents []byte, out interface{}) ([]byte, error) {
line := contents[start:end]
if isYAMLSeparator(line) {
front = contents[frontMatterStart:start]
body = contents[end+1:]
if end+1 < len(contents) {
body = contents[end+1:]
}
break
}
}