Files
gitea/modules
silverwind 621aa67e7d fix(markup): wrap indented code blocks for the code-copy button (#37748)
Indented (4-space) code blocks were emitted by goldmark's default
renderer as plain `<pre><code>` without the `code-block-container`
wrapper that the JS `initMarkupCodeCopy` keys on. As a result, only
fenced code blocks received the copy button. Register
`ast.KindCodeBlock` with a renderer that produces the same wrapper as
the highlighting renderer so both syntaxes get the button.

Extends `TestMarkdownFencedCodeBlock` to assert the wrapper is emitted
for indented blocks (and that HTML inside is escaped).

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-19 15:09:56 +02:00
..
2026-05-15 16:26:36 +02:00
2026-05-15 16:26:36 +02:00
2026-02-28 11:23:20 -08:00
2026-05-15 16:26:36 +02:00
2022-12-30 23:31:00 +08:00
2026-05-15 16:26:36 +02:00
2026-05-15 16:26:36 +02:00
2026-05-13 17:06:53 +00:00