diff options
author | zeripath <art27@cantab.net> | 2022-10-05 19:55:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 19:55:36 +0100 |
commit | 93df41f506fb0c3ca897def5d62abaedc93323d8 (patch) | |
tree | c4781b3570c5c191c6249914b03228a3d9185412 /modules/markup/markdown/meta_test.go | |
parent | 2d2cf589f72241c0ae3c8c05f899950eebb286a6 (diff) | |
download | gitea-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/markdown/meta_test.go')
-rw-r--r-- | modules/markup/markdown/meta_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/markup/markdown/meta_test.go b/modules/markup/markdown/meta_test.go index 9332b35b42..720d0066f4 100644 --- a/modules/markup/markdown/meta_test.go +++ b/modules/markup/markdown/meta_test.go @@ -61,7 +61,7 @@ func TestExtractMetadataBytes(t *testing.T) { var meta structs.IssueTemplate body, err := ExtractMetadataBytes([]byte(fmt.Sprintf("%s\n%s\n%s\n%s", sepTest, frontTest, sepTest, bodyTest)), &meta) assert.NoError(t, err) - assert.Equal(t, bodyTest, body) + assert.Equal(t, bodyTest, string(body)) assert.Equal(t, metaTest, meta) assert.True(t, validateMetadata(meta)) }) @@ -82,7 +82,7 @@ func TestExtractMetadataBytes(t *testing.T) { var meta structs.IssueTemplate body, err := ExtractMetadataBytes([]byte(fmt.Sprintf("%s\n%s\n%s", sepTest, frontTest, sepTest)), &meta) assert.NoError(t, err) - assert.Equal(t, "", body) + assert.Equal(t, "", string(body)) assert.Equal(t, metaTest, meta) assert.True(t, validateMetadata(meta)) }) |