From 3e9a4fa7a2f528419c5d5a40475d5d324a9dd46c Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Fri, 16 Aug 2024 10:19:40 +0100 Subject: [PATCH] Add backticks to format file names as code (#7) The Actions summary view is formatted as Markdown, as Python uses `__` around files (like `__init__.py`) this looks wrong. If we add (escaped) backticks it looks much nicer. Based on an idea by @oscargus raised in #4. --- bin/diff-check | 2 +- spec/black_box/diff-check_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/diff-check b/bin/diff-check index f595ee5..6b97869 100755 --- a/bin/diff-check +++ b/bin/diff-check @@ -6,7 +6,7 @@ if ! git diff-index --quiet HEAD; then printf 'These files changed when running the command:\n\n' git diff --name-only | while read -r n ; do - echo "* $n" + echo "* \`$n\`" done exit 1 diff --git a/spec/black_box/diff-check_spec.rb b/spec/black_box/diff-check_spec.rb index 9b3349e..57be2da 100644 --- a/spec/black_box/diff-check_spec.rb +++ b/spec/black_box/diff-check_spec.rb @@ -25,7 +25,7 @@ expect(session.run("diff-check")).to have_stdout(<<~SUMMARY These files changed when running the command: - * README + * `README` SUMMARY ) end