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