Skip to content

Commit ee5e4d7

Browse files
committed
strip paragraph tags from search results excerpt sample data
Matches default WordPress excerpt formatting set within cdlib website.
1 parent 9526139 commit ee5e4d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elements/3-components/searchresult.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ for (const i of posts.keys()) {
1111
const postTitle = posts[i].title.rendered
1212
const postLink = posts[i].link
1313
const postExcerpt = posts[i].excerpt.rendered
14-
const postExcpertReformatted = postExcerpt.replaceAll('<em>', '<mark>').replaceAll('</em>', '</mark>')
14+
const postExcpertReformatted = postExcerpt.replaceAll('<em>', '<mark>').replaceAll('</em>', '</mark>').replaceAll('<p>', '').replaceAll('</p>', '')
1515

1616
searchResultData.push({
1717
searchresultheading: {

0 commit comments

Comments
 (0)