Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Jul 18, 2024
1 parent b53bf3a commit 7b53830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions markup_fmt/src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,8 +1434,8 @@ fn reflow_with_indent<'i, 'o: 'i>(s: &'i str) -> impl Iterator<Item = Doc<'o>> +
.unwrap_or_default();
s.split('\n').enumerate().flat_map(move |(i, s)| {
let s = s.strip_suffix('\r').unwrap_or(s);
let s = if s.starts_with([' ', '\t']) && s.len() >= indent {
&s[indent..]
let s = if s.starts_with([' ', '\t']) {
&s.get(indent..).unwrap_or(s)
} else {
s
};
Expand Down

0 comments on commit 7b53830

Please sign in to comment.