Skip to content

Commit

Permalink
Update ElasticSearchHighlights.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Nov 14, 2022
1 parent 5475a88 commit f703084
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/components/Views/ElasticSearchHighlights.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ export const getFragments = (highlight) => {
* @returns {Array} Array of strings
*/
export const getMatches = (highlight) => {
console.debug('highlight', highlight);
const regex = /<em>(.*?)<\/em>/gm;
let fragments = getFragments(highlight);
console.debug('fragments', fragments);
let matches = [];
fragments.forEach((fragment) => {
const fragmentmatches = [...fragment.matchAll(regex)];
Expand Down

0 comments on commit f703084

Please sign in to comment.