@koda-sl/baker-cli 0.435.0-dev.e59c50e4b → 0.436.0-dev.17d582030
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -71163,6 +71163,9 @@ var QUOTED_RUN = 5;
|
|
|
71163
71163
|
var SIGNING_ROLE = /^(attribution|author|byline|name|reviewer|source|signature)$/i;
|
|
71164
71164
|
var SIGNED = /(?:^\s*|[\p{Pf}\p{Pe}"'.!?…。!?]\s*)[—–―-]\s*[\p{L}\p{N}]/u;
|
|
71165
71165
|
var QUOTE_ROLE = /^(quote|testimonial|review)$/i;
|
|
71166
|
+
function isSignatureLine(line) {
|
|
71167
|
+
return SIGNING_ROLE.test(line.role ?? "") || /^\s*[—–―-]\s*[\p{L}\p{N}]/u.test(line.text);
|
|
71168
|
+
}
|
|
71166
71169
|
function isCustomersWords(line) {
|
|
71167
71170
|
return SIGNED.test(line.text) || QUOTE_ROLE.test(line.role ?? "") || SIGNING_ROLE.test(line.role ?? "");
|
|
71168
71171
|
}
|
|
@@ -88376,7 +88379,8 @@ async function customersWordsAmong(lines, judge) {
|
|
|
88376
88379
|
const open = [];
|
|
88377
88380
|
lines.forEach((line, i) => {
|
|
88378
88381
|
if (line.role === MESSAGE_ROLE) return;
|
|
88379
|
-
|
|
88382
|
+
const below = lines[i + 1];
|
|
88383
|
+
if (isCustomersWords(line) || below !== void 0 && isSignatureLine(below)) kept.add(i);
|
|
88380
88384
|
else open.push(i);
|
|
88381
88385
|
});
|
|
88382
88386
|
if (!judge || open.length === 0) return kept;
|