online-judge
online-judge copied to clipboard
Fix off-by-1 error in comment revisions
I think https://github.com/DMOJ/online-judge/blob/292ba1a600091dd30c41f34fead38deadaf76536/templates/comments/list.html#L21-L22 has an off-by-1 error which causes comment history to be displayed incorrectly.
As a corollary, I think the code in https://github.com/DMOJ/online-judge/blob/292ba1a600091dd30c41f34fead38deadaf76536/templates/comments/list.html#L70 may also have an off-by-1 error but I am less sure of this.
TODO
- [ ] investigate off-by-1 when populating
data-*-revision
fields - [ ] investigate off-by-1 when printing number of edits