Make checkbox id order ascending (fixes #678)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-11-07 20:53:38 +01:00
parent 2bd77fd2ce
commit 71e6ff1b79

View File

@@ -100,11 +100,11 @@ checkboxReplace = function(md, options, Token) {
continue;
}
tokens = blockTokens[j].children;
i = tokens.length - 1;
while (i >= 0) {
i = 0;
while (i < tokens.length) {
token = tokens[i];
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, splitTextToken(token, state.Token));
i--;
i++;
}
j++;
}