mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 22:00:39 +00:00
Fix markdown preview $$ support (#31514)
close #31481 currently `$$A + B$$ test` will ignore text after $$ block test text  before fix  after fix  github display  (cherry picked from commit f0033051d5ce07f5a18d2aacef6bfdca5fc69014)
This commit is contained in:
parent
e1b90212e4
commit
f92591b825
6 changed files with 79 additions and 6 deletions
|
@ -552,6 +552,14 @@ func TestMathBlock(t *testing.T) {
|
|||
"$a$ ($b$) [$c$] {$d$}",
|
||||
`<p><code class="language-math is-loading">a</code> (<code class="language-math is-loading">b</code>) [$c$] {$d$}</p>` + nl,
|
||||
},
|
||||
{
|
||||
"$$a$$ test",
|
||||
`<p><code class="language-math display is-loading">a</code> test</p>` + nl,
|
||||
},
|
||||
{
|
||||
"test $$a$$",
|
||||
`<p>test <code class="language-math display is-loading">a</code></p>` + nl,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testcases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue