forgejo/modules/markup/markdown
Gergely Nagy a177a5c4cb
modules/markup: Lift out the GitHub callout transformer
This lifts out the GitHub callout transformer from
`modules/markup/markdown/goldmark.go` to `callout/github.go`.

While there, clean up the transformer code:

- Use a map to look up supported callout types, rather than a regexp.
- Allow the callout type to be in any case, rather than just uppercase.
- Simplified `.Segment.Value()` to `.Text()`.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-17 18:04:55 +01:00
..
callout modules/markup: Lift out the GitHub callout transformer 2024-02-17 18:04:55 +01:00
math
ast.go modules/markup: Lift out the GitHub callout transformer 2024-02-17 18:04:55 +01:00
convertyaml.go
goldmark.go modules/markup: Lift out the GitHub callout transformer 2024-02-17 18:04:55 +01:00
markdown.go modules/markup: Lift out the GitHub callout transformer 2024-02-17 18:04:55 +01:00
markdown_test.go
meta.go
meta_test.go
renderconfig.go
renderconfig_test.go
toc.go