Add support for <details> and <summary> tags (#6077)

This commit is contained in:
Stefan Ceriu
2026-09-03 11:47:12 +03:00
committed by GitHub
parent 7052751e38
commit 4355307ba0
15 changed files with 134 additions and 22 deletions
@@ -19,6 +19,7 @@ nonisolated enum HTMLFixtures: String, CaseIterable {
case wideCodeBlock
case unorderedList
case orderedList
case details
var rawValue: String {
switch self {
@@ -123,6 +124,13 @@ nonisolated enum HTMLFixtures: String, CaseIterable {
<li>Skittles</li>
</ol>
"""
case .details:
"""
Text before the details\
<details><summary>Expand me</summary><p>Hidden <b>content</b> with a <a href="https://www.matrix.org">link</a> in it.</p></details>\
<details><p>These details have no summary.</p></details>\
Text after the details
"""
}
}
}