forked from shadowfacts/Tusker
parent
8caf93bf0a
commit
7f4ab57a1d
|
@ -106,9 +106,9 @@ struct HTMLConverter {
|
||||||
let index = (try? node.elementSiblingIndex()) ?? 0
|
let index = (try? node.elementSiblingIndex()) ?? 0
|
||||||
// we use the monospace digit font so that the periods of all the list items line up
|
// we use the monospace digit font so that the periods of all the list items line up
|
||||||
// TODO: this probably breaks with dynamic type
|
// TODO: this probably breaks with dynamic type
|
||||||
bullet = NSAttributedString(string: "\(index + 1).\t", attributes: [.font: UIFont.monospacedDigitSystemFont(ofSize: font.pointSize, weight: .regular)])
|
bullet = NSAttributedString(string: "\(index + 1).\t", attributes: [.font: UIFont.monospacedDigitSystemFont(ofSize: font.pointSize, weight: .regular), .foregroundColor: color])
|
||||||
} else if parentTag == "ul" {
|
} else if parentTag == "ul" {
|
||||||
bullet = NSAttributedString(string: "\u{2022}\t", attributes: [.font: font])
|
bullet = NSAttributedString(string: "\u{2022}\t", attributes: [.font: font, .foregroundColor: color])
|
||||||
} else {
|
} else {
|
||||||
bullet = NSAttributedString()
|
bullet = NSAttributedString()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue