[minor] reduce substr (#18611)
* minor * correct * unify the type of addrLen * Update lib/packages/docutils/rstgen.nim
This commit is contained in:
parent
9a26f5059b
commit
c6fadb1799
2 changed files with 7 additions and 5 deletions
|
|
@ -675,7 +675,7 @@ proc readIndexDir(dir: string):
|
|||
var x = fileEntries[0].link
|
||||
let i = find(x, '#')
|
||||
if i > 0:
|
||||
x = x.substr(0, i-1)
|
||||
x.setLen(i)
|
||||
if i != 0:
|
||||
# don't add entries starting with '#'
|
||||
result.modules.add(x.changeFileExt(""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue