mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
vlib: refactor empty string checks to use s == ''
or s != ''
, instead of s.len == 0
(#21300)
This commit is contained in:
parent
46be635072
commit
8aa9314a99
55 changed files with 95 additions and 96 deletions
|
@ -29,7 +29,7 @@ fn (vd VDoc) gen_markdown(d doc.Doc, with_toc bool) string {
|
|||
fn (vd VDoc) write_markdown_content(contents []doc.DocNode, mut cw strings.Builder, mut hw strings.Builder, indent int, with_toc bool) {
|
||||
cfg := vd.cfg
|
||||
for cn in contents {
|
||||
if with_toc && cn.name.len > 0 {
|
||||
if with_toc && cn.name != '' {
|
||||
hw.writeln(' '.repeat(2 * indent) + '- [${slug(cn.name)}](#${cn.name})')
|
||||
cw.writeln('## ${cn.name}')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue