File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Sources/Markdown/Walker/Walkers Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -215,16 +215,14 @@ public struct HTMLFormatter: MarkupWalker {
215215
216216 // MARK: Inline elements
217217
218- mutating func printInline( tag: String , content: String ) {
219- result += " < \( tag) > \( content) </ \( tag) > "
220- }
221-
222- mutating func printInline( tag: String , _ inline: InlineMarkup ) {
223- printInline ( tag: tag, content: inline. plainText)
218+ mutating func printInline( tag: String , _ content: Markup ) {
219+ result += " < \( tag) > "
220+ descendInto ( content)
221+ result += " </ \( tag) > "
224222 }
225223
226224 public mutating func visitInlineCode( _ inlineCode: InlineCode ) -> ( ) {
227- printInline ( tag : " code " , content : inlineCode. code)
225+ result += " < code> \( inlineCode. code) </code> "
228226 }
229227
230228 public mutating func visitEmphasis( _ emphasis: Emphasis ) -> ( ) {
@@ -283,7 +281,7 @@ public struct HTMLFormatter: MarkupWalker {
283281
284282 public mutating func visitSymbolLink( _ symbolLink: SymbolLink ) -> ( ) {
285283 if let destination = symbolLink. destination {
286- printInline ( tag : " code " , content : destination)
284+ result += " < code> \( destination) </code> "
287285 }
288286 }
289287
You can’t perform that action at this time.
0 commit comments