Skip to content

Commit

Permalink
Added the logic for Japannese search pages for description limiting t…
Browse files Browse the repository at this point in the history
…o 1 line (#540)
  • Loading branch information
meejain authored Dec 13, 2023
1 parent 1d00e1a commit 8b1936d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blocks/search-results/search-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b1936d

Please sign in to comment.