
TurtleArmyandGusted
5b6c702f41
feat(ui): support Pandoc style code blocks (#12099)
This resolves https://codeberg.org/forgejo/forgejo/issues/11107.
Codeberg doesn't support [Pandoc style code blocks](https://pandoc.org/MANUAL.html#extension-fenced_code_attributes), so only the two of these 3 will have syntax highlighting.
\`\`\`haskell
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
\`\`\`
\`\`\`haskell {.numberLines}
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
\`\`\`
\`\`\`{.numberLines .haskell}
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
\`\`\`
```haskell
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
```
```haskell {.numberLines}
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
```
```{.numberLines .haskell}
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
qsort (filter (>= x) xs)
```
This PR adds syntax highlighting to the examples with Pandoc style code blocks. It also adds redundant code to explicitly handle the second case with the trailing attribute syntax, which might be unnecessary since it already works, but I think should be fine to leave in.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12099
Reviewed-by: Ellen Εμίλια Άννα Zscheile <fogti@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-05-12 00:53:09 +02:00
..
2025-03-27 19:40:14 +00:00
2025-04-28 06:46:29 +00:00
2025-03-28 22:22:21 +00:00
2025-03-28 22:22:21 +00:00
2025-03-27 19:40:14 +00:00
2026-05-12 00:53:09 +02:00
2025-03-28 22:22:21 +00:00
2026-05-11 20:21:29 +02:00
2025-01-30 08:20:05 +00:00
2025-03-27 19:40:14 +00:00
2025-03-27 19:40:14 +00:00
2026-04-02 03:29:37 +02:00
2026-01-25 23:10:56 +01:00
2026-01-25 23:10:56 +01:00
2026-04-02 03:29:37 +02:00
2025-09-30 09:39:34 +02:00
2026-04-02 03:29:37 +02:00
2025-06-25 18:31:03 +02:00
2025-12-21 05:21:27 +01:00