tldr-pages / tldr-python-client

:snake: Python command-line client for tldr pages 📚
https://pypi.org/project/tldr/
MIT License
599 stars 95 forks source link

Coloring for printed { } is broken #184

Closed EmilyGraceSeville7cf closed 2 years ago

EmilyGraceSeville7cf commented 2 years ago

image

Sample tldr page:

# awk

> A versatile programming language for working on files.
> See also: `sed`, `ed`.
> More information: <https://manned.org/awk.1>.

- Execute commands:

`awk '{{{ print gensub("apple", "mango", "g") }}}'`

The last } displayed must be red too.

MasterOdin commented 2 years ago

I'm not sure what exactly you're looking for here. Is it that { } characters shouldn't be removed? That the } character is not colored the same as the rest of the example? Happy to help try to address this, but I'm at a loss one what the user expectation is as I don't use awk that much so none of these commands much sense to me.

EmilyGraceSeville7cf commented 2 years ago

That the } character is not colored the same as the rest of the example?

Yes. The problem is not addressed to just awk. It happens with other pages for instance for cat file.json | jq '{my_new_key: .key_name, my_other_key: .other_key_name}' command sample.