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 {
215
215
216
216
// MARK: Inline elements
217
217
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) > "
224
222
}
225
223
226
224
public mutating func visitInlineCode( _ inlineCode: InlineCode ) -> ( ) {
227
- printInline ( tag : " code " , content : inlineCode. code)
225
+ result += " < code> \( inlineCode. code) </code> "
228
226
}
229
227
230
228
public mutating func visitEmphasis( _ emphasis: Emphasis ) -> ( ) {
@@ -283,7 +281,7 @@ public struct HTMLFormatter: MarkupWalker {
283
281
284
282
public mutating func visitSymbolLink( _ symbolLink: SymbolLink ) -> ( ) {
285
283
if let destination = symbolLink. destination {
286
- printInline ( tag : " code " , content : destination)
284
+ result += " < code> \( destination) </code> "
287
285
}
288
286
}
289
287
You can’t perform that action at this time.
0 commit comments