online-judge icon indicating copy to clipboard operation
online-judge copied to clipboard

Fix off-by-1 error in comment revisions

Open kiritofeng opened this issue 1 year ago • 0 comments

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

kiritofeng avatar Dec 05 '23 03:12 kiritofeng