forgejo/modules/markup/markdown
Gusted 4a88dc6416
[GITEA] Require Latex code to have a end sequence
- Currently the parser will look for `\[` and `$$` to detect when Latex
code starts, it will look for `\]` and `$$` respectively in order to
determine the end of the code. However if no end is found the parser
assumes the rest of the input is part of the Latex code.
- Adjust the parser's behavior to not allow the case to assume the rest
of the input is part of the Latex code and requires in order to
determine if some input is Latex code that the end sequence is also
specified.
- Example: `\[hello]` would no longer be detected as Latex code with
this patch.
- Added unit tests.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1817

(cherry picked from commit 452aef1bb1)
(cherry picked from commit 8a857c24b0)
(cherry picked from commit acd1456db9)
(cherry picked from commit 6523b45073)
(cherry picked from commit e2e1a8afe7)
(cherry picked from commit a46ef652eb)
(cherry picked from commit 54d5a8c073)
2024-01-15 16:11:59 +00:00
..
math [GITEA] Require Latex code to have a end sequence 2024-01-15 16:11:59 +00:00
ast.go Fix task list checkbox toggle to work with YAML front matter (#25184) 2023-06-13 14:44:47 +08:00
convertyaml.go Improve Wiki TOC (#24137) 2023-04-17 15:05:19 -04:00
goldmark.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
markdown.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
markdown_test.go [GITEA] Require Latex code to have a end sequence 2024-01-15 16:11:59 +00:00
meta.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
meta_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
renderconfig.go Fix task list checkbox toggle to work with YAML front matter (#25184) 2023-06-13 14:44:47 +08:00
renderconfig_test.go Improve Wiki TOC (#24137) 2023-04-17 15:05:19 -04:00
toc.go Improve Wiki TOC (#24137) 2023-04-17 15:05:19 -04:00