From a1de8f5f98fd024239b4c37d3f195ad8dd3c74c8 Mon Sep 17 00:00:00 2001 From: Swastik Baranwal Date: Sat, 20 Aug 2022 14:32:50 +0530 Subject: [PATCH] vdoc: highlight variadic function parameters (#15474) --- cmd/tools/vdoc/utils.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/vdoc/utils.v b/cmd/tools/vdoc/utils.v index 6bc4398b66..7141d77c56 100644 --- a/cmd/tools/vdoc/utils.v +++ b/cmd/tools/vdoc/utils.v @@ -214,7 +214,7 @@ fn color_highlight(code string, tb &ast.Table) string { } else if (next_tok.kind in [.lcbr, .rpar, .eof, .comma, .pipe, .name, .rcbr, .assign, .key_pub, .key_mut, .pipe, .comma, .comment] && next_tok.lit !in builtin) - && (prev.kind in [.name, .amp, .lcbr, .rsbr, .key_type, .assign, .dot, .question, .rpar, .key_struct, .key_enum, .pipe, .key_interface, .comment] + && (prev.kind in [.name, .amp, .lcbr, .rsbr, .key_type, .assign, .dot, .question, .rpar, .key_struct, .key_enum, .pipe, .key_interface, .comment, .ellipsis] && prev.lit !in builtin) && ((tok.lit != '' && tok.lit[0].is_capital()) || prev_prev.lit in ['C', 'JS']) { tok_typ = .symbol