Style list bullets

This commit is contained in:
mars 2022-10-09 03:12:47 -06:00
parent d7c93ee776
commit c7804d8f68
1 changed files with 4 additions and 1 deletions

View File

@ -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)