privateRemoved: look for paragraph instead of comment, so we can see it in private mode output
This commit is contained in:
parent
e729f3b5b5
commit
78936e968a
|
|
@ -45,12 +45,12 @@
|
|||
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")`,
|
||||
then final output is `withSummary`, otherwise it's `privateRemoved`.
|
||||
*/
|
||||
privateRemoved: Tree.map(withSummary, removePrivate.js)
|
||||
final: (all ? withSummary : privateRemoved) → (tree) => Tree.mapExtension(tree, '.html→')
|
||||
final: (all ? withSummary : privateRemoved ) → (tree) => Tree.mapExtension(tree, '.html→')
|
||||
|
||||
|
||||
renderedPages: Tree.map(final, (page) => <page.ori>(page, all))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const reg = /^(?<public>.+)<!--private-below-->.+$/s
|
||||
const reg = /^(?<public>.+)<p>—private-below—<\/p>.+$/s
|
||||
export default (doc) => {
|
||||
const result = reg.exec(doc._body);
|
||||
if (result) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue