FIX: word boundary regex (\b) not working in Unicode languages. (PR #9163)

Removed the jQuery Highlight plugin and created a new es6 highlighting library.

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

Can we use Node.ELEMENT_NODE and other enums rather than hard coding integers here? It’s much more clear.

Let’s remove this constant too.

  if (!words.length) return node;

The highlight-html lib should be tested :wink:

@vinothkannans are we just waiting on a few tests here prior to merging? Agree it makes sense to test this, especially since it is so easy to test.

Yes, I’ll make it today :+1:

I did some improvements and added a test here @ZogStriP. The highlight function is performing well in big paragraphs and the large number of posts @SamSaffron. Anyway, we’re going keep using \b regex if Unicode words are not found.