Replies: 1 comment 1 reply
-
|
I think I’ve implemented the functions, since PRs are disabled o.O ... here’s a branch where you could pick it from: That originally included a fix for the currently broken The branch also adds I think they should work, but perhaps better double check 😇. Also I’m open if you would like to rename variables or so. Similarly, if you’d want to use As for the licence: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
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 not 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