// // Copyright 2025 Element Creations Ltd. // Copyright 2025 New Vector Ltd. // // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. // Please see LICENSE files in the repository root for full details. // enum HTMLFixtures: String, CaseIterable { case plainText case headers case paragraphs case matrixIdentifiers case links case textFormatting case groupedBlockQuotes case separatedBlockQuotes case codeBlocks case unorderedList case orderedList var rawValue: String { switch self { case .plainText: """ Nothing is as permanent as a temporary solution that works. Experience is the name everyone gives to their mistakes. If debugging is the process of removing bugs, then programming must be the process of putting them in. """ case .headers: """
This is a paragraph.
And this is another one.
\First blockquote with a link in it
Second blockquote with a link in it
Third blockquote with a link in it""" case .separatedBlockQuotes: """ Text before blockquote\
Some blockquote\ Text after first blockquote\
Some other blockquote\ Text after second blockquote """ case .codeBlocks: """
A preformatted code block
struct ContentView: View {
var body: some View {
VStack {
Text("Knock, knock!")
.padding()
.background(Color.yellow, in: RoundedRectangle(cornerRadius: 8))
Text("Who's there?")
}
.padding()
}
}
Followed by some plain code blocks
Hello, world!
Hello, world!
This link should not be interpreted as such
And this https://www.matrix.org should be not highlighted
"""
case .unorderedList:
"""
This is an unordered list