Struggling to create a text highlight filter using vuejs. The task involves iterating through an array of words, highlighting any matches with a span and class. However, I'm facing difficulty in getting the data to return with proper HTML formatting in vuejs. Any suggestions or solutions would be greatly appreciated as I am currently at an impasse.
Vue.filter('highlight', function(words, query){
// Iterate through **words**, apply span style to matches in **query**
// Return formatted string to display on HTML page
})