fix: checklist update not working

Resolves #1114
This commit is contained in:
kolaente 2021-12-05 14:18:53 +01:00
parent 852d71e8b7
commit bba9a8e008
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ Here's some text in between
expect(checkboxes[0]).toBe(0)
expect(checkboxes[1]).toBe(18)
expect(checkboxes[2]).toBe(69)
expect(checkboxes[3]).toBe(90)
})
it('should find one checkbox with *', () => {
const text: string = '* [ ] Lorem Ipsum'

View File

@ -40,7 +40,7 @@ export const findCheckboxesInText = (text: string): number[] => {
return [
...checkboxes.checked,
...checkboxes.unchecked,
].sort()
].sort((a, b) => a < b ? -1 : 1)
}
export const getChecklistStatistics = (text: string): CheckboxStatistics => {