Skip to content

Commit

Permalink
Support direct rendering of HTML (if richTextV2 or Markdown is used a…
Browse files Browse the repository at this point in the history
…nd conversion to HTML is enabled)

J=BACK-2241

T=manual

created a test site using the answers hitchikers theme and verified that rich text was rendered properly
  • Loading branch information
saahithjanapati committed Jun 15, 2023
1 parent 0b43256 commit 873783a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions directanswercards/documentsearch-standard/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class documentsearch_standardComponent extends BaseDirectAnswerCard['documentsea
let snippetValue = '';
if (answer.fieldType === "rich_text" && snippet) {
snippetValue = ANSWERS.formatRichText(snippet.value, 'snippet', linkTarget);
} else if (answer.fieldType == "html" && snippet) {
snippetValue = snippet.value;
} else if (snippet) {
snippetValue = Formatter.highlightField(snippet.value, snippet.matchedSubstrings);
}
Expand Down

0 comments on commit 873783a

Please sign in to comment.