diff options
author | ThibG <thib@sitedethib.com> | 2019-06-27 16:43:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 16:43:55 +0200 |
commit | 2f95adc06fbfae22e8f9b4df212938108f5e295c (patch) | |
tree | 13ff1b5ae743f3d147eb58dfa4a790ef1a7c049d /app/javascript/flavours/glitch/actions | |
parent | 9ef25877dfda12cf31ec586294e4d4908f5be4f0 (diff) | |
parent | 6ab7051b48dcb1d45c377a129350db1fdeaf11b8 (diff) |
Merge pull request #1142 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-rw-r--r-- | app/javascript/flavours/glitch/actions/importer/normalizer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js index a8c3fe16a..c19ca8265 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -55,7 +55,7 @@ export function normalizeStatus(status, normalOldStatus) { normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml'); } else { const spoilerText = normalStatus.spoiler_text || ''; - const searchContent = [spoilerText, status.content].join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n'); + const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n'); const emojiMap = makeEmojiMap(normalStatus); normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent; |