Method that yields differences between two pieces of text.
// method
Pacem.Utils.diff(a: string, b: string) : DiffToken[]
Direct utilization in the markup, using the relevant transformer:
<!-- compare two strings -->
<pacem-span content="{{ $pacem.diff('Text with a typ0.', 'Text without a typo.') }}"></pacem-span>
That obtains the following output:
Cantami, o Diva, del pelide Achille l'ira funesta che infiniti addusse lutti agli Achei.
Canta, o dea, l'ira d'Achille Pelide, rovinosa, che infiniti dolori inflisse agli Achei.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.