Skip to content

Commit

Permalink
fmt: fix module docs generation (#9810)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Neubert committed Apr 20, 2021
1 parent 4a1f75c commit fe88a44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vlib/v/fmt/fmt.v
Expand Up @@ -1951,6 +1951,9 @@ fn split_up_infix(infix_str string, ignore_paren bool) ([]string, []int) {
fn (mut f Fmt) write_splitted_infix(conditions []string, penalties []int, ignore_paren bool) {
for i, cnd in conditions {
c := cnd.trim_space()
if c.len == 0 {
continue
}
if f.line_len + c.len < fmt.max_len[penalties[i]] {
if (i > 0 && i < conditions.len) || (ignore_paren && i == 0 && c.len > 5 && c[3] == `(`) {
f.write(' ')
Expand Down

0 comments on commit fe88a44

Please sign in to comment.