-
Notifications
You must be signed in to change notification settings - Fork 70
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New {.bullets } style #363
base: main
Are you sure you want to change the base?
Conversation
To collapse vectors into bullets: ``` ❯ cli_text("Some values {.bullets {letters[1:5]}} blah blah") Some values • a • b • c • d • e blah blah ``` Closes #265.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I agree that introducing newlines automatically around bullet lists would be more user friendly since that's the desired formatting 99% of the time.
True, but it is easy to add newlines with |
OTOH we can always make a different class for that later, if it turns out to be needed. |
Or maybe we could add newlines like this? It seems more readable: cli::cli_text("
Some values
{.bullets {letters[1:5]}}
blah blah
") (sorry if that doesn't make sense in the cli DSL with which I'm not familiar yet) |
Yeah, |
Is the leading space in the block of text ignored or is it taken literally? If blocks of text are the default way of using cli, then having to use |
Leading space is ignored, yeah: ❯ cli::cli_text(" foo bar")
foo bar |
But I really don't mind putting in the newlines by default, I think we both agree that that's most common. |
New {.bullets } style
To collapse vectors into bullets:
Right now you need to add newlines explicitly at the beginning and at the end:
It can be combined with markup, but the markup has to be nested inside:
@jennybc Should we always add line breaks at the beginning and the end?
Closes #265.