| 1 | diff --git a/internal/wiki/wiki.go b/internal/wiki/wiki.go |
| 2 | index 9e13959..b78bb05 100644 |
| 3 | --- a/internal/wiki/wiki.go |
| 4 | +++ b/internal/wiki/wiki.go |
| 5 | @@ -98,7 +98,7 @@ func RenderHTML(content string) template.HTML { |
| 6 | case "pre": |
| 7 | b.WriteString("<pre><code") |
| 8 | if block.lang != "" { |
| 9 | - b.WriteString(` class="language-` + template.HTMLEscapeString(block.lang) + `"`) |
| 10 | + b.WriteString(` data-lang="` + template.HTMLEscapeString(block.lang) + `"`) |
| 11 | } |
| 12 | b.WriteString(">" + template.HTMLEscapeString(block.text) + "</code></pre>\n") |
| 13 | case "heading": |
| 14 | diff --git a/internal/wiki/wiki_test.go b/internal/wiki/wiki_test.go |
| 15 | index 24732b8..e40121f 100644 |
| 16 | --- a/internal/wiki/wiki_test.go |
| 17 | +++ b/internal/wiki/wiki_test.go |
| 18 | @@ -67,7 +67,7 @@ func TestRenderHTMLSupportedSyntax(t *testing.T) { |
| 19 | "<h2>Lists</h2>", |
| 20 | "<ul>\n<li>one <a href=\"/wiki/wiki-page\">Wiki Page</a></li>\n<li>two <a href=\"/wiki/%D0%B4%D1%80%D1%83%D0%B3%D0%B0%D1%8F\">shown</a></li>\n</ul>", |
| 21 | "<ol>\n<li>first</li>\n<li>second</li>\n</ol>", |
| 22 | - "<pre><code class=\"language-go\">func main() {}\n<script>alert(1)</script>\n</code></pre>", |
| 23 | + "<pre><code data-lang=\"go\">func main() {}\n<script>alert(1)</script>\n</code></pre>", |
| 24 | "<a href=\"/open?target=nostr%3Anpub1bob\">Bob</a>", |
| 25 | "<a href=\"/wiki/reference\">reference</a>", |
| 26 | "<a href=\"https://example.org/\">defined</a>", |