Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

use less -r instead of less -R for -p option #238

Closed
namespaceYcZ opened this issue Feb 20, 2023 · 3 comments
Closed

use less -r instead of less -R for -p option #238

namespaceYcZ opened this issue Feb 20, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@namespaceYcZ
Copy link

namespaceYcZ commented Feb 20, 2023

According to less's manual page, -R option cause only ANSI "color" escape sequences output in raw form.
2023-02-20_105945
mdcat -p uses -R, which makes emojis and links look ugly in less:
(sorry for wiping out my privicy from the pictures)
(first picture: my test.md content)
2023-02-20_110133
(second picture: mdcat test.md, perfect)
2023-02-20_110204
(third picture: mdcat test.md -p (default to less -R, exactly the same as mdcat test.md|less -R)
2023-02-20_110218
(fourth picture: mdcat test.md|less -r, much better)
2023-02-20_110700

@swsnr
Copy link
Owner

swsnr commented Feb 20, 2023

Would you make a merge request to fix this?

@swsnr swsnr added the bug Something isn't working label Feb 20, 2023
@swsnr
Copy link
Owner

swsnr commented Feb 20, 2023

Never mind, fixed it.

@swsnr
Copy link
Owner

swsnr commented Feb 20, 2023

Fixed by a7d8ce3

@swsnr swsnr closed this as completed Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants