Skip to content

Commit f5f10af

Browse files
committed
Updated rule for fenced code rendering.
1 parent 9ca1847 commit f5f10af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CommonMarkdown/CommonMarkdown/HTMLRenderer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ public class HTMLRenderer {
8080
var attributes = [String: String]()
8181
let infoWords = split(info, { $0 == " " }, maxSplit: 1, allowEmptySlices: true)
8282
if !infoWords.isEmpty && !infoWords[0].isEmpty {
83-
attributes = ["class": infoWords[0]]
83+
attributes = ["class": "language-" + infoWords[0]]
8484
}
8585

86-
return inTags("pre", attributes: attributes, contents: inTags("code", contents: escape(block.stringContent)))
86+
return inTags("pre", contents: inTags("code", attributes: attributes, contents: escape(block.stringContent)))
8787

8888
case .HtmlBlock:
8989

0 commit comments

Comments
 (0)