Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/Parma/ParmaCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ extension ParmaCore: XMLParserDelegate {
func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?) {
let element = Element.element(elementName)

linkElementComposer.destination.map {
// Update foundCharacters with an embedded link to leverage SwiftUI handle it
context.foundCharacters = "[\(context.foundCharacters)](\($0))"
}

if element.isInline {
if let text = inlineComposers[element]?.text(in: context, render: render) {
if let superEl = context.superElement, superEl.isInline {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Parma/Render/ParmaRenderable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public protocol ParmaRenderable {
// MARK: - Default render style
extension ParmaRenderable {
public func plainText(_ text: String) -> Text {
Text(text)
Text(.init(text))
}

public func strong(textView: Text) -> Text {
Expand Down