mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: fix panic on empty // comment on v doc -f html file.v; turn expected code block after empty example to a warning
This commit is contained in:
@@ -303,7 +303,7 @@ fn html_highlight(code string, tb &ast.Table) string {
|
||||
} else if typ == .char {
|
||||
'`$tok.lit`'
|
||||
} else if typ == .comment {
|
||||
if tok.lit[0] == 1 { '//${tok.lit[1..]}' } else { '//$tok.lit' }
|
||||
if tok.lit != '' && tok.lit[0] == 1 { '//${tok.lit[1..]}' } else { '//$tok.lit' }
|
||||
} else {
|
||||
tok.lit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user