Skip to content

_includes/cli.md: fix flag descriptions with < and > - #12083

Merged
usha-mandya merged 1 commit into
docker:masterfrom
thaJeztah:fix_flag_descriptions
Jan 13, 2021
Merged

_includes/cli.md: fix flag descriptions with < and >#12083
usha-mandya merged 1 commit into
docker:masterfrom
thaJeztah:fix_flag_descriptions

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

fixes#11331
replaces / closes#12064

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|<id>[=<socket>|<key>[,<key>]])

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.

Before this patch:

Screenshot 2021-01-12 at 16 20 38

After this patch:

Screenshot 2021-01-12 at 16 20 16

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

@usha-mandya@StefanScherer PTAL

StefanScherer
StefanScherer previously approved these changes Jan 13, 2021

@StefanSchererStefanScherer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

Hmm, Netlify failed; doesn't look related, but not sure how to restart it

Gem::RemoteFetcher::FetchError: bad response Gateway Error 502 (https://rubygems.org/gems/ruby2_keywords-0.0.2.gem)
/opt/buildhome/.rvm/rubies/ruby-2.3.6/lib/ruby/site_ruby/2.3.0/rubygems/remote_fetcher.rb:274:in `fetch_http'
/opt/buildhome/.rvm/rubies/ruby-2.3.6/lib/ruby/site_ruby/2.3.0/rubygems/remote_fetcher.rb:292:in `fetch_path'
/opt/buildhome/.rvm/rubies/ruby-2.3.6/lib/ruby/site_ruby/2.3.0/rubygems/remote_fetcher.rb:327:in `cache_update_path'

@thaJeztahthaJeztah reopened this Jan 13, 2021
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

close/reopen didn't seem to trigger it again; let me rebase/push

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|<id>[=<socket>|<key>[,<key>]])
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 <github@gone.nl>
@netlify

netlifyBot commented Jan 13, 2021

Copy link
Copy Markdown

✔️ Deploy preview for docsdocker ready!

🔨 Explore the source changes: ac39688

🔍 Inspect the deploy logs: https://app.netlify.com/sites/docsdocker/deploys/5ffec14dd22ca500070cbc17

😎 Browse the preview: https://deploy-preview-12083--docsdocker.netlify.app

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

All green now; @StefanScherer@usha-mandya ptal 🤗

@usha-mandyausha-mandya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @thaJeztah

@usha-mandya
usha-mandya merged commit be15606 into docker:masterJan 13, 2021
@thaJeztah
thaJeztah deleted the fix_flag_descriptions branch January 13, 2021 10:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect HTML output

3 participants

@thaJeztah@StefanScherer@usha-mandya