mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: highlight terminal examples for -comments -color
(#13937)
This commit is contained in:
@ -161,6 +161,9 @@ fn color_highlight(code string, tb &ast.Table) string {
|
||||
.char {
|
||||
lit = term.yellow('`$tok.lit`')
|
||||
}
|
||||
.comment {
|
||||
lit = if tok.lit[0] == 1 { '//${tok.lit[1..]}' } else { '//$tok.lit' }
|
||||
}
|
||||
.keyword {
|
||||
lit = term.bright_blue(tok.lit)
|
||||
}
|
||||
|
Reference in New Issue
Block a user