mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: unwrap long infix exprs inside parenthesis if necessary (#8609)
This commit is contained in:
@ -310,7 +310,7 @@ fn (vd VDoc) gen_html(d doc.Doc) string {
|
||||
} else {
|
||||
symbols_toc_str
|
||||
}).replace('{{ contents }}', contents.str()).replace('{{ right_content }}', if cfg.is_multi
|
||||
&& vd.docs.len > 1&& d.head.name != 'README' {
|
||||
&& vd.docs.len > 1 && d.head.name != 'README' {
|
||||
'<div class="doc-toc"><ul>' + symbols_toc_str + '</ul></div>'
|
||||
} else {
|
||||
''
|
||||
@ -401,7 +401,7 @@ fn html_highlight(code string, tb &table.Table) string {
|
||||
if token.is_key(tok.lit) || token.is_decl(tok.kind) {
|
||||
tok_typ = .keyword
|
||||
} else if tok.kind == .decl_assign || tok.kind.is_assign() || tok.is_unary()
|
||||
|| tok.kind.is_relational()|| tok.kind.is_infix() {
|
||||
|| tok.kind.is_relational() || tok.kind.is_infix() {
|
||||
tok_typ = .operator
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user