edit full article archive to publication standard
Build and deploy / deploy (push) Successful in 18s
Build and deploy / deploy (push) Successful in 18s
This commit is contained in:
@@ -3,6 +3,7 @@ import { access, readFile } from 'node:fs/promises';
|
||||
import { promisify } from 'node:util';
|
||||
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
||||
import { fileURLToPath, pathToFileURL } from 'node:url';
|
||||
import { cleanReaderHtml } from '../lib/editorial-content.mjs';
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
const webRoot = join(fileURLToPath(new URL('..', import.meta.url)));
|
||||
@@ -97,7 +98,7 @@ let failed = false;
|
||||
|
||||
for (const revision of revisions) {
|
||||
const issues = [];
|
||||
const content = revision.contentHtml || '';
|
||||
const content = cleanReaderHtml(revision.contentHtml || '');
|
||||
const body = bodyText(content);
|
||||
const openingParagraphs = [...content.matchAll(/<p>([\s\S]*?)<\/p>/g)]
|
||||
.slice(0, 2)
|
||||
|
||||
Reference in New Issue
Block a user