From 8b1936d0746cf47cb0200551b3c7258a1ebad66b Mon Sep 17 00:00:00 2001 From: meejain <37831850+meejain@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:57:25 +0530 Subject: [PATCH] Added the logic for Japannese search pages for description limiting to 1 line (#540) --- blocks/search-results/search-results.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blocks/search-results/search-results.js b/blocks/search-results/search-results.js index cb3eaf61..206e3189 100644 --- a/blocks/search-results/search-results.js +++ b/blocks/search-results/search-results.js @@ -132,7 +132,9 @@ async function searchPages(placeholders, term, page) { header.appendChild(link); res.appendChild(header); const para = document.createElement('p'); - setResultValue(para, line.description, term); + if (getLanguage() === 'jp') { + setResultValue(para, line.description.split('。')[0], term); + } else setResultValue(para, line.description, term); res.appendChild(para); div.appendChild(res);