You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for working on this project, I've used it for a while and it's really slick, kudos.
I have noticed that when ANSI escape sequences are used to denote colour of the text to use when rendering the text in the terminal, they are rendered "as-is". The sphinx-click parses the strings using statemachine.string2lines(); it does not show any consideration for any eventual escape sequences that may be present -- this results in raw escape sequences text being rendered in the HTML documentation.
I believe it may be beneficial to strip the escape sequences given that it's quite likely developers of the click applications may take advantage of custom colorisation of their help documentation that is going to be rendered in the terminal with pretty colours.
Do you think it would be reasonable to strip the escape codes out of any string that is going to be read from the command line documentation (description, subcommands, options, etc) using a regexp such as the one used in the example above? Are there any complications that I may have overseen?
Many thanks.
The text was updated successfully, but these errors were encountered:
This should be doable, hopefully without extra dependencies. Not sure when I'll have a chance to have a look at this but I'd be happy to guide anyone that was interested in fixing this.
Thank you for working on this project, I've used it for a while and it's really slick, kudos.
I have noticed that when ANSI escape sequences are used to denote colour of the text to use when rendering the text in the terminal, they are rendered "as-is". The
sphinx-click
parses the strings usingstatemachine.string2lines()
; it does not show any consideration for any eventual escape sequences that may be present -- this results in raw escape sequences text being rendered in the HTML documentation.I believe it may be beneficial to strip the escape sequences given that it's quite likely developers of the
click
applications may take advantage of custom colorisation of their help documentation that is going to be rendered in the terminal with pretty colours.To illustrate the problem:
The rendered HTML docs for the colorised epilog:
Do you think it would be reasonable to strip the escape codes out of any string that is going to be read from the command line documentation (description, subcommands, options, etc) using a regexp such as the one used in the example above? Are there any complications that I may have overseen?
Many thanks.
The text was updated successfully, but these errors were encountered: