Question test

This commit is contained in:
Ian Gulliver
2026-10-16 07:24:14 -07:00
parent 55f6a7e424
commit 9a7de4c4b2
3 changed files with 5 additions and 12 deletions
+2 -5
View File
@@ -213,22 +213,19 @@ function item(body, opts) {
const target = picker ? detail : li;
const first = picker ? [] : [body[0]];
const rest = body.slice(1);
if (rest.every((l) => !startsBlockLine(l)) && !rest.includes("")) {
if (rest.every((_, n) => !startsBlock(body, n + 1)) && !rest.includes("")) {
target.append(...joinLines([...first, ...rest].map((l) => l.trim()), opts));
return li;
}
const head = first;
let k = 1;
while (k < body.length && body[k] !== "" && !startsBlockLine(body[k])) {
while (k < body.length && body[k] !== "" && !startsBlock(body, k)) {
head.push(body[k].trim());
k++;
}
target.append(...joinLines(head, opts), ...blocks(body.slice(k), opts));
return li;
}
function startsBlockLine(line) {
return fence.test(line) || heading.test(line) || quote.test(line) || bullet.test(line) || ordered.test(line);
}
function cells(line) {
let s = line.trim();
if (s.startsWith("|")) {
+1 -1
View File
File diff suppressed because one or more lines are too long