Skip to content
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

Clean up table formatting #30

Merged
merged 1 commit into from
Feb 17, 2021
Merged

Clean up table formatting #30

merged 1 commit into from
Feb 17, 2021

Conversation

florimondmanca
Copy link
Contributor

Follow-up for #25, refs #11

  • Fix : :option-style: -> :style: for consistency with other option names.
  • Fix: pass style to sub-commands (otherwise only top command would be formatted using the given style)
  • Refactor table formatting logic using extra intermediary functions.
  • Add a bunch of comments to help with readability and understanding of the code.
  • Some other nits.

@florimondmanca florimondmanca merged commit f581485 into master Feb 17, 2021
@florimondmanca florimondmanca deleted the fm/table-cleanup branch February 17, 2021 17:29
def _make_table_options(ctx: click.Context) -> Iterator[str]:
"""Create the table style options description."""
# Unicode "Vertical Line" character (U+007C), HTML-compatible.
# "\|" (escaped pipe) would work, too, but linters don't like it in literals.
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't know that escaping works in Python-Markdown:flushed: HTML entities would be preferred as it depends on the parser implementation though.

@florimondmanca florimondmanca mentioned this pull request Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants