Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
fix(snippet): support replacing multiple highlighting tags
Browse files Browse the repository at this point in the history
Closes: #106
  • Loading branch information
rayrutjes committed May 18, 2017
1 parent 0cbcf01 commit 15280ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/vue-instantsearch-snippet/src/Snippet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ export default {
},
domProps: {
innerHTML: attributeValue
.replace(HIGHLIGHT_PRE_TAG, `<${tagName}>`)
.replace(HIGHLIGHT_POST_TAG, `</${tagName}>`),
.split(HIGHLIGHT_PRE_TAG)
.join(`<${tagName}>`)
.split(HIGHLIGHT_POST_TAG)
.join(`</${tagName}>`),
},
});
},
Expand Down

0 comments on commit 15280ee

Please sign in to comment.