ForEach loop for Markdown builder #200
metronome12
started this conversation in
Ideas
Replies: 1 comment
-
Hi @metronome12, There is no need to add a let paragraphs = ["the quick brown fox jumps over the lazy dog", "She sell sea shells..."]
var body: some View {
Markdown {
"""
## Using a Markdown Content Builder
Use Markdown strings or an expressive domain-specific language
to build the content.
"""
Heading(.level2) {
"Try MarkdownUI"
}
for paragraph in paragraphs {
Paragraph {
paragraph
"."
}
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be possible to add a ForEach loop to the Markdown DSL so that it could be used to generate markdown documents?
This would be similar to the ForEach operator in SwiftUI and would allow dynamic construction of documents with data.
For example:
Beta Was this translation helpful? Give feedback.
All reactions