From fe88a4460bea09f9c9a4dcd4d561b368b8a1041a Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Tue, 20 Apr 2021 03:54:08 +0200 Subject: [PATCH] fmt: fix module docs generation (#9810) --- vlib/v/fmt/fmt.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index a853baa557..6e8c658bf1 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -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(' ')