scrapbox-tl-dr-processor
https://gyazo.com/62bea5e3fd440127b7389aef89fc81d7
サムネイル画像は関係なし。
code: index.js
export class ScrapboxTLDRProcessor {
async process({text}) {
const lines = text.split("\n");
const tlDRLines = lines.flatMap(
).map(indentedHelpMatch => {
const helpLine = indentedHelpMatch2; groupMatch => groupMatch1.split("|").flatMap( word => word.startsWith(":") ? [|${word}, word] : []
)
);
return `${indentedHelpMatch1}${ [...excludedWords, "(", ")", """].reduce(
(helpLine, excludedWord) => helpLine.replaceAll(excludedWord, ""),
helpLine)
.replaceAll("|", ", ")
}`;
});
return {
text: [
...lines,
...tlDRLines.length ? [
"",
"",
"(Targets)",
...tlDRLines,
""
] : [],
].join("\n")
};
}
}
? A
?B
? この(ページ|記事|:書き記し)はテストである