mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +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:
parent
cf92224248
commit
4da2908d63
6 changed files with 36 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue