Skip to content

Commit

Permalink
add text highlighting on searched text
Browse files Browse the repository at this point in the history
  • Loading branch information
fredEbho committed Feb 3, 2024
1 parent 1caa6ef commit ddade1b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
<div class="col-4 d-flex ">
<p> <img style="height: 50px; width: 50px;" :alt="lesson.topic" :src="getImageUrl(lesson.image)"></img></p>
<p style="margin-left: 20px;">
Add text highlighting to searched text
<template v-for="(fragment, i) in lesson.topic.toString().split(new RegExp(`(?<=${search})|(?=${search})`, 'i'))">
<mark v-if="fragment.toLowerCase() === search.toLowerCase()" :key="i" class="text-warning">
{{ fragment }}
Expand Down

0 comments on commit ddade1b

Please sign in to comment.