|
@@ -1,10 +1,12 @@
|
|
|
module.exports = function articleDecorator(config, item, meta) {
|
|
module.exports = function articleDecorator(config, item, meta) {
|
|
|
let blurb = "No description.";
|
|
let blurb = "No description.";
|
|
|
const introMatches = item.content.match(
|
|
const introMatches = item.content.match(
|
|
|
- new RegExp("<p>(?<introText>[a-zA-Z0-9 :,.-]+)</p>", "m")
|
|
|
|
|
|
|
+ new RegExp("<p>(?<introText>.*?)</p>", "ms")
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
if (introMatches) {
|
|
if (introMatches) {
|
|
|
|
|
+ console.log("groups:", introMatches.groups);
|
|
|
|
|
+ console.log("content:", item.content);
|
|
|
blurb = introMatches.groups.introText.trim();
|
|
blurb = introMatches.groups.introText.trim();
|
|
|
}
|
|
}
|
|
|
const titleStart = item.content.indexOf(">", item.content.indexOf("<h1")) + 1;
|
|
const titleStart = item.content.indexOf(">", item.content.indexOf("<h1")) + 1;
|