diff --git a/cmd/tools/vdoc/utils.v b/cmd/tools/vdoc/utils.v index 157f57bb80..0ab7d2041c 100644 --- a/cmd/tools/vdoc/utils.v +++ b/cmd/tools/vdoc/utils.v @@ -152,7 +152,7 @@ fn color_highlight(code string, tb &table.Table) string { term.yellow('`$tok.lit`') } .keyword { - term.blue(tok.lit) + term.bright_blue(tok.lit) } .builtin, .symbol { term.green(tok.lit) @@ -243,17 +243,11 @@ fn color_highlight(code string, tb &table.Table) string { } } buf.write_string(highlight_code(tok, tok_typ)) - if prev_prev.kind == .eof { + if prev_prev.kind == .eof || prev.kind == .eof || next_tok.kind == .eof { break } prev_prev = prev - if prev.kind == .eof { - break - } prev = tok - if next_tok.kind == .eof { - break - } i = tok.pos + tok.len tok = next_tok next_tok = s.scan() diff --git a/cmd/tools/vdoc/vdoc.v b/cmd/tools/vdoc/vdoc.v index 1408f5754a..0f89e0b307 100644 --- a/cmd/tools/vdoc/vdoc.v +++ b/cmd/tools/vdoc/vdoc.v @@ -90,7 +90,7 @@ fn (vd VDoc) gen_plaintext(d doc.Doc) string { mut pw := strings.new_builder(200) if cfg.is_color { content_arr := d.head.content.split(' ') - pw.writeln('${term.blue(content_arr[0])} ${term.green(content_arr[1])}\n') + pw.writeln('${term.bright_blue(content_arr[0])} ${term.green(content_arr[1])}\n') } else { pw.writeln('$d.head.content\n') }