Skip to content

Conversation

DannyBen
Copy link
Member

@DannyBen DannyBen commented Aug 25, 2023

This PR updates the markdown template for the bashly render :mardown command. In addition, some adjustments in other areas were required to make the most out of the metadata in bashly.yml.

  • String#sanitize_for_print was updated to escape backticks. This is used in bash print command, and we do not want it to mean "execute this command" but rather "mark this as code", which is rendered nicely in markdown and CLI.
  • Add String#nl2br and String#for_markdown, which is used in the template, for escaping < and >.
  • Update the markdown.gtx template to display all the information it has, in a unified and markdown-native manner.
  • Update the generated bash print lines to use sanitize_for_print wherever there is a chance that these lines will include backticks - to allow developers to use backticks in help messages (for markdown).
  • Update rendering integration specs to test additional features of the template.

@DannyBen DannyBen merged commit 2b77ac8 into master Aug 25, 2023
@DannyBen DannyBen deleted the refactor/markdown-template branch August 25, 2023 07:48
Sign up for free to 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.

1 participant