<div style="outline: thin dashed lightblue; -webkit-hyphens: auto;">
    I <span id="could-not">couldn&rsquo;t</span> tell if she truly advocated antidisestablishmentarianism.
</div>
<script>
    var couldNot = document.getElementById("could-not");
    var width = couldNot.getBoundingClientRect().width;
    couldNot.parentElement.style.width = Math.ceil(width);
</script>
