diff --git a/a_pubfile.md b/a_pubfile.md index d12a507..7efb3ca 100644 --- a/a_pubfile.md +++ b/a_pubfile.md @@ -3,10 +3,12 @@ title: My Public File cuid: 26e4-a1 --- + + This is a public file with some nice text. It's easy to write in this file. - + I can write more things after the comment if I want. diff --git a/html-manipulations/addSummary.js b/html-manipulations/addSummary.js index 7e312d8..22a1442 100644 --- a/html-manipulations/addSummary.js +++ b/html-manipulations/addSummary.js @@ -1,6 +1,8 @@ //looks for an html comment pattern, and, if found, //adds the text before it to the doc under the key `summary`. -const reg = /^(?.+)?/s +const reg = /.*(?.+)?/s +//use a custom element instead. +// const reg = /(?.+)?<\/doc-summary>/s export default (doc) => { const result = reg.exec(doc._body); if (result) {