mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-16 18:01:33 +00:00
- Inline math blocks couldn't be preceeded or succeeded by alphanumerical characters due to changes introduced in PR #21171. Removed the condition that caused this (precedingCharacter condition) and added a new exit condition of the for-loop that checks if a specific '$' was escaped using '\' so that the math expression can be rendered as intended. - Additionally this PR fixes another bug where math blocks of the type '$xyz$abc$' where the dollar sign was not escaped by the user, generated an error (shown in the screenshots below) - Altered the tests to accomodate for the changes Former behaviour (from try.gitea.io): ![image]( |
||
|---|---|---|
| .. | ||
| block_node.go | ||
| block_parser.go | ||
| block_renderer.go | ||
| inline_node.go | ||
| inline_parser.go | ||
| inline_renderer.go | ||
| math.go | ||