"))
}
for section in x.sections where !section.isEmpty {
switch section.kind {
case .paragraph:
- body += card(section.title, "
\(esc(section.paragraph))
")
+ cards += card(section.title, "
\(esc(section.paragraph))
")
case .bullets:
- body += card(section.title, "
" + section.bullets.map { "
\(esc($0))
" }.joined() + "
")
+ cards += card(section.title, "
" + section.bullets.map { "
\(esc($0))
" }.joined() + "
")
case .items:
let lis = section.items.map { item -> String in
var s = "
\(esc(item.text))"
- if let who = item.who { s += " \(esc(who))" }
- if let note = item.note { s += " (\(esc(note)))" }
- if let when = item.when { s += " \(RecapAnalyzer.mmss(Double(when)))" }
+ if let who = item.who { s += " \(esc(who))" }
+ if let note = item.note { s += " (\(esc(note)))" }
+ if let when = item.when { s += " \(RecapAnalyzer.mmss(Double(when)))" }
return s + "
"
}.joined()
- body += card(section.title, "
\(lis)
")
+ cards += card(section.title, "
\(lis)
")
}
}
}
+ let band = cards.isEmpty ? "" : "
\(cards)
"
- if !result.sections.isEmpty {
- var topics = ""
- for (i, sec) in result.sections.enumerated() {
- let range = entries.indices.contains(sec.startIndex) && entries.indices.contains(sec.endIndex)
- ? "\(RecapAnalyzer.mmss(entries[sec.startIndex].offset))–\(RecapAnalyzer.mmss(entries[sec.endIndex].end))" : ""
- topics += "\(i + 1) \(esc(sec.title)) \(range)"
- if !sec.summary.isEmpty { topics += "