summaryrefslogtreecommitdiffstats
path: root/modules/markup/html_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-10-05 19:55:36 +0100
committerGitHub <noreply@github.com>2022-10-05 19:55:36 +0100
commit93df41f506fb0c3ca897def5d62abaedc93323d8 (patch)
treec4781b3570c5c191c6249914b03228a3d9185412 /modules/markup/html_test.go
parent2d2cf589f72241c0ae3c8c05f899950eebb286a6 (diff)
downloadgitea-93df41f506fb0c3ca897def5d62abaedc93323d8.tar.gz
gitea-93df41f506fb0c3ca897def5d62abaedc93323d8.zip
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>
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r--modules/markup/html_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go
index 370bc21822..e57187a677 100644
--- a/modules/markup/html_test.go
+++ b/modules/markup/html_test.go
@@ -7,6 +7,7 @@ package markup_test
import (
"context"
"io"
+ "os"
"strings"
"testing"
@@ -32,6 +33,7 @@ func TestMain(m *testing.M) {
if err := git.InitSimple(context.Background()); err != nil {
log.Fatal("git init failed, err: %v", err)
}
+ os.Exit(m.Run())
}
func TestRender_Commits(t *testing.T) {
@@ -336,7 +338,7 @@ func TestRender_emoji(t *testing.T) {
`<p>Some text with <span class="emoji" aria-label="grinning face with smiling eyes">😄</span><span class="emoji" aria-label="grinning face with smiling eyes">😄</span> 2 emoji next to each other</p>`)
test(
"😎ðŸĪŠðŸ”ðŸĪ‘❓",
- `<p><span class="emoji" aria-label="smiling face with sunglasses">😎</span><span class="emoji" aria-label="zany face">ðŸĪŠ</span><span class="emoji" aria-label="locked with key">🔐</span><span class="emoji" aria-label="money-mouth face">ðŸĪ‘</span><span class="emoji" aria-label="question mark">❓</span></p>`)
+ `<p><span class="emoji" aria-label="smiling face with sunglasses">😎</span><span class="emoji" aria-label="zany face">ðŸĪŠ</span><span class="emoji" aria-label="locked with key">🔐</span><span class="emoji" aria-label="money-mouth face">ðŸĪ‘</span><span class="emoji" aria-label="red question mark">❓</span></p>`)
// should match nothing
test(