euparliamentmonitor 0.9.23 → 0.9.24
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/package.json
CHANGED
|
@@ -37,27 +37,6 @@ export function buildArticleSlug(date, articleType, runSuffix) {
|
|
|
37
37
|
export function sanitizeRunSuffix(runId) {
|
|
38
38
|
return _sanitizeRunSuffix(runId);
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Return `true` when a line should be skipped when hunting for the default
|
|
42
|
-
* description. Thin wrapper preserved for back-compat — real logic lives
|
|
43
|
-
* in `src/aggregator/article-metadata.ts`'s `shouldSkipDescriptionLine`.
|
|
44
|
-
*
|
|
45
|
-
* @param line - Trimmed line from the aggregated Markdown source
|
|
46
|
-
* @returns `true` when the line is not prose and should be skipped
|
|
47
|
-
*/
|
|
48
|
-
function shouldSkipDescriptionLine(line) {
|
|
49
|
-
if (line.length === 0)
|
|
50
|
-
return true;
|
|
51
|
-
if (line.startsWith('#'))
|
|
52
|
-
return true;
|
|
53
|
-
if (line.startsWith('>'))
|
|
54
|
-
return true;
|
|
55
|
-
if (line.startsWith('<'))
|
|
56
|
-
return true;
|
|
57
|
-
if (line.startsWith('|'))
|
|
58
|
-
return true;
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
40
|
/** Description used when no prose paragraph qualifies. */
|
|
62
41
|
const FALLBACK_DESCRIPTION = 'EU Parliament intelligence summary derived from committed analysis artifacts.';
|
|
63
42
|
/**
|
|
@@ -73,7 +52,6 @@ const FALLBACK_DESCRIPTION = 'EU Parliament intelligence summary derived from co
|
|
|
73
52
|
* @returns Plain-text description, truncated to ≤300 characters
|
|
74
53
|
*/
|
|
75
54
|
export function extractDefaultDescription(markdown) {
|
|
76
|
-
void shouldSkipDescriptionLine;
|
|
77
55
|
const strong = extractStrongProseLine(markdown);
|
|
78
56
|
return strong.length > 0 ? strong : FALLBACK_DESCRIPTION;
|
|
79
57
|
}
|