html-manipulations/addSummary.js: rename and document to reflect better what it does
This commit is contained in:
parent
da749db12a
commit
7af7f1f0e1
|
|
@ -1,3 +1,5 @@
|
|||
//looks for an html comment pattern, and, if found,
|
||||
//adds the text before it to the doc under the key `summary`.
|
||||
const reg = /^(?<summary>.+)?<!--summary-above-->/s
|
||||
export default (doc) => {
|
||||
const result = reg.exec(doc._body);
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
and ends up in a separate field of the document.
|
||||
So we dont have to worry about the title being part of the summary.
|
||||
*/
|
||||
withSummary: Tree.map(asHtml, ./html-manipulations/extractSummary.js)
|
||||
withSummary: Tree.map(asHtml, ./html-manipulations/addSummary.js)
|
||||
|
||||
/*
|
||||
Removing private content coming below the html paragraph `<p>—private-below—</p>`
|
||||
|
|
|
|||
Loading…
Reference in New Issue