1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-12-11 07:50:29 +00:00

Make diff-task handle code blocks

Github markdown allows using 4 (or more) backticks to differentiate
between triple backticks inside the code blocks. Seeing as how most
task-diffs will probably have some form of markdown with codeblocks
inside them, this will escape that.
This commit is contained in:
Frerik Andriessen 2021-11-01 14:28:41 +01:00 committed by tekton-robot
parent f4708d478e
commit a771c5cefc

View File

@ -98,9 +98,9 @@ type -p pbcopy >/dev/null 2>/dev/null && copier=pbcopy
( (
echo "<details><summary>Diff between version ${previous_task_version} and ${task_version}</summary>" echo "<details><summary>Diff between version ${previous_task_version} and ${task_version}</summary>"
echo echo
echo "\`\`\`diff" echo "\`\`\`\`diff"
diff -urN task/${task_name}/${previous_task_version} task/${task_name}/${task_version} diff -urN task/${task_name}/${previous_task_version} task/${task_name}/${task_version}
echo "\`\`\`" echo "\`\`\`\`"
echo echo
echo "</details>" echo "</details>"
)| tee ${difffilename} | ${copier} )| tee ${difffilename} | ${copier}