@@ -11,15 +11,15 @@ const getCode = ({ theme, type }: { theme: "light" | "dark"; type: "react" | "vu
1111import { generateDiffFile } from "@git-diff-view/file";
1212import "@git-diff-view/react/styles/diff-view.css";
1313
14- // git mode
14+ // git mode, use \`git diff\` output to render
1515const getDiffFile = () => {
1616 // see https://git-scm.com/docs/git-diff
1717 const instance = new DiffFile(oldFileName, oldContent, newFileName, newContent, [ git diff output string ]);
1818 instance.initRaw();
1919 return instance;
2020}
2121
22- // file mode
22+ // file mode, use \`string content\` to render
2323const getDiffFile = () => {
2424 const instance = generateDiffFile(oldFileName, oldContent, newFileName, newContent, '', '');
2525 instance.initRaw();
@@ -36,15 +36,15 @@ const App = () => {
3636 import { generateDiffFile } from "@git-diff-view/file";
3737 import "@git-diff-view/vue/styles/diff-view.css";
3838
39- // git mode
39+ // git mode, use \`git diff\` output to render
4040 const getDiffFile = () => {
4141 // see https://git-scm.com/docs/git-diff
4242 const instance = new DiffFile(oldFileName, oldContent, newFileName, newContent, [ git diff output string ]);
4343 instance.initRaw();
4444 return instance;
4545 }
4646
47- // file mode
47+ // file mode, use \`string content\` to render
4848 const getDiffFile = () => {
4949 const instance = generateDiffFile(oldFileName, oldContent, newFileName, newContent, '', '');
5050 instance.initRaw();
0 commit comments