Re: RFE: Integrate Critic Markup into AsciiDoc

Posted by Alexander Schwartz on
URL: https://discuss.asciidoctor.org/RFE-Integrate-Critic-Markup-into-AsciiDoc-tp8263p8271.html

That I've tried in the past (as technical prototype) as critics markup is not available:
  1. Marking block manually as added/removed using roles
    ++++
    <style>
    .removed{background-color: #fdb8c0}
    .added{background-color: #acf2bd}
    </style>
    ++++
    
    Hello [.added]##to the ##world! This [.removed]##an##[.added]##a## test!
    
    Produces:
  2. Post-processing HTML output of a new version and an old version using HTML-diffing (for example NPM package htmldiff-js). This leads to very similar results, but will highlight all changes in the HTML. A very minimal live prototype is here: https://asciidoc-editor.ahus1.de; once you edit a file, you can toggle the preview to show you a HTML-diff
Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de