rtfpessoa / diff2html

Pretty diff to html javascript library (diff2html)
https://diff2html.xyz
MIT License
2.79k stars 272 forks source link

Getting the data structure used for HTML rendering (Nodejs use) #533

Closed jkavalec closed 1 day ago

jkavalec commented 1 month ago

Hi,

from demo, It seems this tool has everything I would expect for side by side diff, except that I need render diff within Nodejs environment.

I was looking at docs but couldn't find anything.

Is there any way to get a structure that has all the data used for HTML rendering, so that it could be used in other environments i.e. Nodejs?

rtfpessoa commented 1 day ago

👋 So if I understood correctly you want to use just the parsing capabilities? If yes, here are the docs about the parse API without the rendering https://github.com/rtfpessoa/diff2html?tab=readme-ov-file#diff2html-api

Feel free to reopen if you need more help