Skip to content

Commit

Permalink
refactor: remove yellow highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
nicov-iov committed Nov 14, 2024
1 parent cfbc18e commit 200f67c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/Search/CtrlSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
:href="result.link"
@touchend.passive="gotoResult($event, i)"
@click="gotoResult($event, i)"
v-html="highlightedText(result.name || result.value)"
>
{{ result.name || result.value }}
</a>
</div>
</template>
Expand Down Expand Up @@ -92,12 +92,6 @@ export default {
'searchTypes',
'fetchSearch'
]),
highlightedText (text) {
const formattedValue = this.formatValue(this.value)
const regex = new RegExp(`(${formattedValue})`, 'gi')
const highlightedText = text.replace(regex, (match) => `<span class="highlight">${match}</span>`)
return highlightedText
},
formatValue (value) {
return value.toString().replaceAll(',', '').trim()
},
Expand Down

0 comments on commit 200f67c

Please sign in to comment.