JSFiddle - React, Tailwind, and code Playground
HTML
<h3>
<a href="/news/here-is-a-url-with-ffi-ligature">Here is a ffi ligature</a>
</h3>
<h3>
Here is a ffi ligature
</h3>
JavaScript
// ligatures.js
$.fn.ligature = function(str, lig) {
return this.each(function() {
this.innerHTML = this.innerHTML.replace(new RegExp(str, 'g'), lig);
});
};
$('h3 a, h3:not(:has(a))').ligature('ffi', 'ffi').ligature('ffl', 'ffl').ligature('ff', 'ff').ligature('fi', 'fi').ligature('fl', 'fl');