Check whether function has been called to avoid multiple inserts of markup

Added an if statements that checks whether the class is already present around the highlight. If so it assumes that the function has already been called and doesn't re-insert the markup.

This approach does require a class to be defined.