I need help writing a text highlight filter using vuejs. The idea is to loop through a given array of words and if there is a match, apply a span with a class to that word.
As Jeff just said, the basic mustaches interprets the data as plain text.
You can add your span by replacing the query with the String.replace() method.
Here's a basic example: https://jsfiddle.net/0jew7LLz/
Vue.filter('highlight', function(words, query) {
return words.replace(query, '' + query + '')
});