|
1 | 1 | import { type Node, parse } from "@progfay/scrapbox-parser"; |
2 | | -import type { BaseLine } from "@cosense/types/userscript"; |
3 | 2 | import { toTitleLc } from "../title.ts"; |
4 | 3 | import { parseYoutube } from "../parser/youtube.ts"; |
5 | 4 |
|
@@ -279,32 +278,3 @@ const makeInlineCodeForDescription = (text: string): `\`${string}\`` => |
279 | 278 | `\`${text.trim().replaceAll("`", "\\`").slice(0, 198)}\``; |
280 | 279 |
|
281 | 280 | const cutId = (link: string): string => link.replace(/#[a-f\d]{24,32}$/, ""); |
282 | | - |
283 | | -/** Extract Helpfeel entries from text |
284 | | - * |
285 | | - * Helpfeel is a Scrapbox notation for questions and help requests. |
286 | | - * Lines starting with "?" are considered Helpfeel entries and are |
287 | | - * used to collect questions and support requests within a project. |
288 | | - * |
289 | | - * ```ts |
290 | | - * import { assertEquals } from "@std/assert/equals"; |
291 | | - * |
292 | | - * const text = `test page |
293 | | - * [normal]link |
294 | | - * but \`this [link]\` is not a link |
295 | | - * |
296 | | - * code:code |
297 | | - * Links [link] and images [https://scrapbox.io/files/65f29c0c9045b5002522c8bb.svg] in code blocks should be ignored |
298 | | - * |
299 | | - * ? Need help with setup!! |
300 | | - * `; |
301 | | - * |
302 | | - * assertEquals(getHelpfeels(text.split("\n").map((text) => ({ text }))), [ |
303 | | - * "Need help with setup!!", |
304 | | - * ]); |
305 | | - * ``` |
306 | | - */ |
307 | | -export const getHelpfeels = (lines: Pick<BaseLine, "text">[]): string[] => |
308 | | - lines.flatMap(({ text }) => |
309 | | - /^\s*\? .*$/.test(text) ? [text.trimStart().slice(2)] : [] |
310 | | - ); |
0 commit comments