mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
vdoc: show //
comment prefix and hide any \x01 character (#13880)
This commit is contained in:
parent
bc98c11d9d
commit
9c1981a309
1 changed files with 2 additions and 0 deletions
|
@ -302,6 +302,8 @@ fn html_highlight(code string, tb &ast.Table) string {
|
|||
"'$tok.lit'"
|
||||
} else if typ == .char {
|
||||
'`$tok.lit`'
|
||||
} else if typ == .comment {
|
||||
if tok.lit[0] == 1 { '//${tok.lit[1..]}' } else { '//$tok.lit' }
|
||||
} else {
|
||||
tok.lit
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue