vdoc: show `//` comment prefix and hide any \x01 character

pull/13880/head
Nick Treleaven 2022-03-30 19:00:46 +01:00
parent 875ad1f6ea
commit 74ccbef038
1 changed files with 2 additions and 0 deletions

View File

@ -298,6 +298,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
}