Skip to content

Commit

Permalink
Merge branch 'fix-tab-indent-li' into 'master'
Browse files Browse the repository at this point in the history
Remove implementation support for tab-indented list items

See merge request mkjeldsen/commitmsgfmt!52
  • Loading branch information
commonquail committed Sep 29, 2023
2 parents ffbe169 + 41a08de commit ffef1c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/commitmsgfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,6 @@ foo
- spc-indented continuation line
that should be realigned
\t- tab-indented continuation line
that should be realigned
";

let expected = "
Expand All @@ -354,9 +351,6 @@ foo
- spc-indented continuation line
that should be realigned
\t- tab-indented continuation line
\t that should be realigned
";

assert_eq!(filter(34, &input), expected);
Expand Down
6 changes: 5 additions & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn mk_regex_list_item() -> Regex {
r"(?x)
^(?P<indent>
# Lists may be indented a little; too much and they become literals.
\s{0,2}
[\ ]{0,2}
)
(?P<li>
(:?
Expand Down Expand Up @@ -826,6 +826,8 @@ paragraph
- paragraph
- spaced list item
\t- tab indent is literal, not list item
"
),
[
Expand Down Expand Up @@ -874,6 +876,8 @@ paragraph
ListType("- ".to_owned()),
"spaced list item".to_owned()
),
VerticalSpace,
Literal("\t- tab indent is literal, not list item"),
],
);
}
Expand Down

0 comments on commit ffef1c9

Please sign in to comment.