From 7f4ab57a1d9e2532fc707321e534f1484e59d5d0 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 12 Dec 2022 21:00:12 -0500 Subject: [PATCH] Fix
  • bullets/numbers appearing black in dark mode Closes #304 --- Tusker/HTMLConverter.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/HTMLConverter.swift b/Tusker/HTMLConverter.swift index 4ceae78d..e2d52396 100644 --- a/Tusker/HTMLConverter.swift +++ b/Tusker/HTMLConverter.swift @@ -106,9 +106,9 @@ struct HTMLConverter { let index = (try? node.elementSiblingIndex()) ?? 0 // we use the monospace digit font so that the periods of all the list items line up // 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" { - bullet = NSAttributedString(string: "\u{2022}\t", attributes: [.font: font]) + bullet = NSAttributedString(string: "\u{2022}\t", attributes: [.font: font, .foregroundColor: color]) } else { bullet = NSAttributedString() }