fix filter search index being too strict when looking for line breaks (#6318)

th-downstream
codl 7 years ago committed by Eugen Rochko
parent 55567d05b2
commit 4d15390eb6

@ -54,7 +54,7 @@ const normalizeStatus = (state, status) => {
normalStatus.reblog = status.reblog.id; normalStatus.reblog = status.reblog.id;
} }
const searchContent = [status.spoiler_text, status.content].join('\n\n').replace(/<br \/>/g, '\n').replace(/<\/p><p>/g, '\n\n'); const searchContent = [status.spoiler_text, status.content].join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
const emojiMap = normalStatus.emojis.reduce((obj, emoji) => { const emojiMap = normalStatus.emojis.reduce((obj, emoji) => {
obj[`:${emoji.shortcode}:`] = emoji; obj[`:${emoji.shortcode}:`] = emoji;

Loading…
Cancel
Save