privateRemoved: look for paragraph instead of comment, so we can see it in private mode output

This commit is contained in:
Hans Fast 2026-03-19 11:20:32 +01:00
parent e729f3b5b5
commit 78936e968a
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@
withSummary: Tree.map(asHtml, extractSummary.js) withSummary: Tree.map(asHtml, extractSummary.js)
/* /*
Removing private content coming below the html comment `<!--private-below-->` Removing private content coming below the html paragraph `<p>—private-below—</p>`
Only remove this if in public mode. So if this file is called as `site.ori("all")`, Only remove this if in public mode. So if this file is called as `site.ori("all")`,
then final output is `withSummary`, otherwise it's `privateRemoved`. then final output is `withSummary`, otherwise it's `privateRemoved`.
*/ */

View File

@ -1,4 +1,4 @@
const reg = /^(?<public>.+)<!--private-below-->.+$/s const reg = /^(?<public>.+)<p>private-below<\/p>.+$/s
export default (doc) => { export default (doc) => {
const result = reg.exec(doc._body); const result = reg.exec(doc._body);
if (result) { if (result) {