|
28 | 28 | mode: Literal["markdown", "xml"] = "markdown"
|
29 | 29 |
|
30 | 30 |
|
31 |
| -def patch_to_markdown(patch: str, filename: str, append: bool = False) -> str: |
| 31 | +def patch_to_markdown(filename: str, patch: str, append: bool = False) -> str: |
32 | 32 | _tool = "patch" if not append else "append"
|
33 | 33 | return f"```{_tool} {filename}\n{patch}\n```"
|
34 | 34 |
|
35 | 35 |
|
36 |
| -def patch_to_xml(patch: str, filename: str, append: bool = False) -> str: |
| 36 | +def patch_to_xml(filename: str, patch: str, append: bool = False) -> str: |
37 | 37 | _tool = "patch" if not append else "append"
|
38 | 38 | return f"<{_tool} filename='{filename}'>\n{patch}\n</patch>"
|
39 | 39 |
|
40 | 40 |
|
41 |
| -def patch_to_output(patch: str, filename: str, append: bool = False) -> str: |
| 41 | +def patch_to_output(filename: str, patch: str, append: bool = False) -> str: |
42 | 42 | if mode == "markdown":
|
43 |
| - return patch_to_markdown(patch, filename, append) |
| 43 | + return patch_to_markdown(filename, patch, append) |
44 | 44 | elif mode == "xml":
|
45 |
| - return patch_to_xml(patch, filename, append) |
| 45 | + return patch_to_xml(filename, patch, append) |
46 | 46 | else:
|
47 | 47 | raise ValueError(f"Invalid mode: {mode}")
|
48 | 48 |
|
|
0 commit comments