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
I'd like allow for making optional use of rich or things like e.g. rich_argparse.
Problem is now, that if rich isn’t available (or explicitly disabled, e.g. via some option), then I need a way to get rid of any rich markup that I’ve included in my strings for the case that rich is available/used.
While I can do this of course with rich itself (like via rich.text.Text.from_markup(markup).plain), I need it for the case that rich isn’t available.
Could you perhaps ship an “official” example function that covers all possible markup formats and removes them from a given string (and also undoes any escaping via e.g. rich.markup.escape())? Ideally under some permissive licence (well for me GPL would be okay, but others might find this useful, too).
People could then copy and paste that in their code and use it in case rich isn’t available.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey.
I'd like allow for making optional use of
richor things like e.g.rich_argparse.Problem is now, that if
richisn’t available (or explicitly disabled, e.g. via some option), then I need a way to get rid of anyrichmarkup that I’ve included in my strings for the case thatrichis available/used.While I can do this of course with
richitself (like viarich.text.Text.from_markup(markup).plain), I need it for the case thatrichisn’t available.Could you perhaps ship an “official” example function that covers all possible markup formats and removes them from a given string (and also undoes any escaping via e.g.
rich.markup.escape())? Ideally under some permissive licence (well for me GPL would be okay, but others might find this useful, too).People could then copy and paste that in their code and use it in case
richisn’t available.Thanks :-)
Beta Was this translation helpful? Give feedback.
All reactions