threads / patch / 51495

patchFix rendering of text in angle brackets in README.md

Subject: [PATCH 0/1] Fix rendering of text in angle brackets in README.md

## tl;dr

3 messages between Jul 18, 2019 and Jul 18, 2019. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Doug Ilijev via GitGitGadget· Jul 18, 2019, 19:08 UTC · lore

Markdown incorrectly interpreted <commandname> as an HTML tag; use backticks to escape Documentation/git-<commandname>.txt to ensure that it renders the text as intended.

An alternative would be to HTML-escape the angle-brackets, at the cost of readability of the markdown in plaintext form. I opted for the backticks to preserve plaintext readability.

Doug Ilijev (1):
  README: fix rendering of text in angle brackets
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 9d418600f4d10dcbbfb0b5fdbc71d509e03ba719
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-289%2Fdilijev%2Fpatch-1-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-289/dilijev/patch-1-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/289
-- 
gitgitgadget
Doug Ilijev via GitGitGadget· Jul 18, 2019, 19:08 UTC · re: Doug Ilijev via GitGitGadget · lore

[PATCH 1/1] README: fix rendering of text in angle brackets

From: Doug Ilijev <doug.ilijev@gmail.com>

Markdown incorrectly interpreted `<commandname>` as an HTML tag; use backticks to escape `Documentation/git-<commandname>.txt` to ensure that it renders the text as intended.

Signed-off-by: Doug Ilijev <doug.ilijev@gmail.com>
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to README.md +1 −1
diff --git a/README.md b/README.md
index 88f126184c..e1d2b82209 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ including full documentation and Git related tools.
 
 See [Documentation/gittutorial.txt][] to get started, then see
 [Documentation/giteveryday.txt][] for a useful minimum set of commands, and
-Documentation/git-<commandname>.txt for documentation of each command.
+`Documentation/git-<commandname>.txt` for documentation of each command.
 If git has been correctly installed, then the tutorial can also be
 read with `man gittutorial` or `git help tutorial`, and the
 documentation of each command with `man git-<commandname>` or `git help
-- 
gitgitgadget
Jeff King· Jul 18, 2019, 20:17 UTC · re: Doug Ilijev via GitGitGadget · lore

Re: [PATCH 0/1] Fix rendering of text in angle brackets in README.md

On Thu, Jul 18, 2019 at 12:08:45PM -0700, Doug Ilijev via GitGitGadget wrote:
Show 7 quoted lines
> Markdown incorrectly interpreted <commandname> as an HTML tag; use backticks
> to escape Documentation/git-<commandname>.txt to ensure that it renders the
> text as intended.
> 
> An alternative would be to HTML-escape the angle-brackets, at the cost of
> readability of the markdown in plaintext form. I opted for the backticks to
> preserve plaintext readability.

Yeah, I think backticks are the best solution; they match what we do later in that same paragraph.

This kind of "an alternative..." explanation would go very well in the actual commit message, too. :) Other than that nit, the patch looks good to me.

-Peff

← back to recent threads