Question test
This commit is contained in:
Vendored
+2
-5
@@ -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("|")) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user