FIX: Missing PG topic title headline when pg headlines is enabled.

This commit is contained in:
Guo Xiang Tan 2020-12-21 15:08:25 +08:00 committed by Alan Guo Xiang Tan
parent 293b243aeb
commit 8336c2235e
1 changed files with 4 additions and 1 deletions

View File

@ -151,7 +151,10 @@ createSearchResult({
h(
"span.topic-title",
{ attributes: { "data-topic-id": topic.id } },
new Highlighted(topic.fancyTitle, term)
this.siteSettings.use_pg_headlines_for_excerpt &&
result.topic_title_headline
? new RawHtml({ html: `<span>${result.topic_title_headline}</span>` })
: new Highlighted(topic.fancyTitle, term)
),
];