Support additional text on the same lines as section headings.

This commit is contained in:
2023-07-19 13:23:59 -05:00
parent e832b91443
commit 9ca5a1b99c
2 changed files with 25 additions and 8 deletions

View File

@@ -40,6 +40,13 @@ h3 {
text-decoration: underline;
}
h3 .section-text {
font-style: italic;
font-size: 1em;
font-weight: normal;
margin: 0 0.5em;
}
.line {
display: flex;
flex-direction: row;
@@ -108,7 +115,13 @@ proc toHtml(ctx: var FormatContext, node: ChordChartNode, indent: string): strin
of ccnkSection:
ctx.currentSection = node
result &= indent & "<section>\p" &
indent & " " & "<h3>" & node.sectionName & "</h3>\p"
indent & " " & "<h3>" & node.sectionName
if ctx.currentSection.remainingSectionLine.isSome:
result &= "<span class='section-text'>" &
ctx.currentSection.remainingSectionLine.get & "</span>"
result &= "</h3>\p"
var contents = newSeq[string]()
for contentNode in node.sectionContents: