From c7804d8f68ccd96a378e73f3564113ac11b43cf8 Mon Sep 17 00:00:00 2001 From: mars Date: Sun, 9 Oct 2022 03:12:47 -0600 Subject: [PATCH] Style list bullets --- src/layout.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/layout.rs b/src/layout.rs index e770db9..298fcab 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -109,7 +109,9 @@ impl BlockTag { let mut lines = Vec::new(); let mut index = 1; let spacer: String = std::iter::repeat(" ").take(indent).collect(); - let mut prefix = format!("{:>width$} ", style.ul_prefix, width = indent - 2); + + let prefix = format!("{:>width$} ", style.ul_prefix, width = indent - 2); + let mut prefix = style.bullet.paint(prefix).to_string(); let available_width = if available_width > indent { available_width - indent @@ -120,6 +122,7 @@ impl BlockTag { for child in self.children.iter() { if ordered { prefix = format!("{:>width$}. ", index, width = indent - 2); + prefix = style.bullet.paint(prefix).to_string(); } let options = textwrap::Options::new(available_width)