From 99c3ab1e5946b3bd0010092bfba630a257b259c8 Mon Sep 17 00:00:00 2001 From: Eugene Dudnyk Date: Sat, 2 Oct 2021 15:06:55 +0200 Subject: [PATCH 1/2] Supporting fix of https://github.com/DoccZz/DocCArchive/issues/2 --- Sources/DocCHTMLExporter/HTML/InlineContentHTML.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/DocCHTMLExporter/HTML/InlineContentHTML.swift b/Sources/DocCHTMLExporter/HTML/InlineContentHTML.swift index 0e1a07f..7c3734f 100644 --- a/Sources/DocCHTMLExporter/HTML/InlineContentHTML.swift +++ b/Sources/DocCHTMLExporter/HTML/InlineContentHTML.swift @@ -25,7 +25,8 @@ extension DocCArchive.InlineContent { case .emphasis(let value): return "" + value.generateHTML(in: ctx) + "" - + case .strong(let value): + return "" + value.generateHTML(in: ctx) + "" case .reference(let identifier, let isActive, _ /* let overridingTitle */, _ /* let overridingTitleInlineContent */): From e59c25d325cb392e1c1d95a0fb0b4654d9520aeb Mon Sep 17 00:00:00 2001 From: Eugene Dudnyk Date: Sat, 2 Oct 2021 16:52:32 +0200 Subject: [PATCH 2/2] Supporting fix of https://github.com/DoccZz/DocCArchive/issues/3 --- Sources/DocCHTMLExporter/Templates/CodeListing.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/DocCHTMLExporter/Templates/CodeListing.swift b/Sources/DocCHTMLExporter/Templates/CodeListing.swift index 0fe82be..0aa24a3 100644 --- a/Sources/DocCHTMLExporter/Templates/CodeListing.swift +++ b/Sources/DocCHTMLExporter/Templates/CodeListing.swift @@ -21,14 +21,14 @@ let CodeListingTemplate = Mustache( extension DZRenderingContext { - func renderCodeListing(syntax: String = "Swift", lines: [ String ]) -> String + func renderCodeListing(syntax: String? = "Swift", lines: [ String ]) -> String { struct Line { let line : Int let code : String } return templates.codeListing( - syntax: syntax, + syntax: syntax ?? "", lines: lines.enumerated().map { idx, code in Line(line: idx + 1, code: code) }