mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
edge case detection for page numbering logic
This commit is contained in:
parent
ebdaa9529c
commit
d0f28daa7c
1 changed files with 6 additions and 1 deletions
|
@ -43,7 +43,12 @@ func Numberize(pages []Page) {
|
|||
end = uint64(len(parts))
|
||||
}
|
||||
parts = parts[0 : len(parts)-int(end)]
|
||||
parts[len(parts)-1]++
|
||||
|
||||
i := len(parts) - 1
|
||||
if i < 0 {
|
||||
i = 0
|
||||
}
|
||||
parts[i]++
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue