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', '&#xfb03;').ligature('ffl', '&#xfb04;').ligature('ff', '&#xfb00;').ligature('fi', '&#xfb01;').ligature('fl', '&#xfb02;');