Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: render Markdown in rich parameter descriptions#6098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 10 commits intocoder:mainfrommtojek:5931-description-markdown-2
Feb 8, 2023

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedFeb 8, 2023
edited
Loading

Fixes:#5931

This PR introduces an option to use Markdown tags in rich parameter descriptions.

CLI will switch todescription_plaintext to skip all tags. It usesglow to render the Markdown content as ASCII text.

CLI:
Screenshot 2023-02-08 at 11 39 18

Site:
Screenshot 2023-02-08 at 11 39 24

Template:

data"coder_parameter""random_string" {name="Random string"icon="/icon/aws.png"description=<<-EOT    See the [registry](https://container.registry.blah/namespace) for *options*.    EOTdefault="helloworld"mutable=true}

@mtojekmtojek self-assigned thisFeb 8, 2023
@mtojekmtojek marked this pull request as ready for reviewFebruary 8, 2023 10:57
@mtojekmtojek requested a review frommafredriFebruary 8, 2023 10:57
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

That markdown lib was an nice find! My main concern is the lossiness of the plaintext output, otherwise this looks good. 👍🏻


` + "`There are also code tags!`"

expected := "Provide the machine image See the registry for options. Minion This is bold text. This is bold text. This is italic text. Blockquotes can also be nested. Strikethrough. 1. Lorem ipsum dolor sit amet. 2. Consectetur adipiscing elit. 3. Integer molestie lorem at massa. There are also code tags!"
Copy link
Member

Choose a reason for hiding this comment

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

Do we actually want the CLI output to be this lossy? For instance:

  • Why do we not keep newlines?
  • Why don't we print links? We could e.g. do something like:See the registry (https://container.registry.blah/namespace) for options.

If newlines are not wanted here, perhaps we could call the fieldDescriptionCondensed instead of plaintext?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good call, mate! We can safely leave them.

Screenshot 2023-02-08 at 12 39 59

mafredri reacted with heart emoji
@mtojekmtojek requested a review frommafredriFebruary 8, 2023 11:42
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Lovely!

@mtojekmtojek merged commit1dc4778 intocoder:mainFeb 8, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 8, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mafredrimafredrimafredri approved these changes

Assignees

@mtojekmtojek

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Allow template parameter descriptions to be markdown

2 participants

@mtojek@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp