forked from mars/tml
Style list bullets
This commit is contained in:
parent
d7c93ee776
commit
c7804d8f68
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue