Fixed numbering on html report

This commit is contained in:
Claudio Maggioni 2023-03-07 17:09:02 +01:00
parent 12e7ad711e
commit b76bb49480

View file

@ -185,8 +185,8 @@ function toc(str) {
token.heading = opts.strip ? utils.strip(token.text, opts) : token.text; token.heading = opts.strip ? utils.strip(token.text, opts) : token.text;
if (token.heading.indexOf("Ex -") >= 0) { if (token.heading.indexOf("Ex -") >= 0) {
task_count++;
token.heading = token.heading.replace("Ex -", `<span class='task'>${task_count}.</span> `); token.heading = token.heading.replace("Ex -", `<span class='task'>${task_count}.</span> `);
task_count++;
} }
// Create a "slugified" id for linking // Create a "slugified" id for linking
@ -364,8 +364,8 @@ renderer.heading = function (text, level, raw, slugger) {
// console.log(text); // console.log(text);
if (text.indexOf("Ex -") >= 0) { if (text.indexOf("Ex -") >= 0) {
task_count++;
text = text.replace("Ex -", `<span class='task'>${task_count}.</span> `); text = text.replace("Ex -", `<span class='task'>${task_count}.</span> `);
task_count++;
} }
// let sec = "<section>" // let sec = "<section>"