From ac396880ec38def4145bec9e4cb4d9d8d48500e7 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 12 Jan 2021 16:26:07 +0100 Subject: [PATCH] _includes/cli.md: fix flag descriptions with < and > Some flag descriptions contain point-brackets to indicate required options, e.g.: --ssh stringArray SSH agent socket or keys to expose to the build (format: default|[=|[,]]) When rendering those options as HTML, those options were not visible as they were rendered as a HTML element. Given that flag-descriptions are not expected to have MarkDown or HTML formatting, we can HTML-escape them to prevent this. This patch escapes the flag-descriptions using liquid's `esacape` command. Signed-off-by: Sebastiaan van Stijn --- _includes/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/cli.md b/_includes/cli.md index b2519e161e18..c846d13cffcf 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -126,7 +126,7 @@ For example uses of this command, refer to the [examples section](#examples) bel `--{{ option.option }}{% if option.shorthand %} , -{{ option.shorthand }}{% endif %}` {{ option-default }} - {% if all-badges != '' %}{{ all-badges | strip }}
{% endif %}{{ option.description | strip }} + {% if all-badges != '' %}{{ all-badges | strip }}
{% endif %}{{ option.description | strip | escape }} {% endfor %}