From 93df41f506fb0c3ca897def5d62abaedc93323d8 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 5 Oct 2022 19:55:36 +0100 Subject: 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 Co-authored-by: wxiaoguang --- modules/markup/html_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/markup/html_test.go') 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) { `

Some text with 😄😄 2 emoji next to each other

`) test( "😎ðŸĪŠðŸ”ðŸĪ‘❓", - `

😎ðŸĪŠðŸ”ðŸĪ‘❓

`) + `

😎ðŸĪŠðŸ”ðŸĪ‘❓

`) // should match nothing test( -- cgit v1.2.3