@@ -63,6 +63,7 @@ Diff to Html generates pretty HTML diffs from unified and git diff output in you
6363 --lm, --matching Diff line matching type [choices: "lines", "words", "none"] [default: "none"]
6464 --lmt, --matchWordsThreshold Diff line matching word threshold [default: "0.25"]
6565 --lmm, --matchingMaxComparisons Diff line matching maximum line comparisons of a block of changes [default: 2500]
66+ --hwt, --htmlWrapperTemplate Path to custom template to be rendered when using the "html" output format [string]
6667 -f, --format Output format [choices: "html", "json"] [default: "html"]
6768 -d, --diff Diff style [choices: "word", "char"] [default: "word"]
6869 -i, --input Diff input source [choices: "file", "command", "stdin"] [default: "command"]
@@ -84,6 +85,14 @@ Diff to Html generates pretty HTML diffs from unified and git diff output in you
8485 -> print json format to stdout
8586 diff2html -F my-pretty-diff.html -- -M HEAD~1
8687 -> print to file
88+ diff2html -F my-pretty-diff.html --hwt my-custom-template.html -- -M HEAD~1
89+ -> print to file using custom markup
90+ templates can include the following variables:
91+ `<!--diff2html-css-->` - writes default CSS to page
92+ `<!--diff2html-js-ui-->` - writes default JavaScript UI scripts to page
93+ `//diff2html-fileListCloseable` - writes code to support selected list interaction, must be within a <script> block
94+ `//diff2html-synchronisedScroll` - writes code to support selected scroll interaction, must be within a <script> block
95+ `<!--diff2html-diff-->` - writes diff content to page
8796
8897 © 2014-2016 rtfpessoa
8998 For support, check out https://github.com/rtfpessoa/diff2html-cli
0 commit comments