-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix
: file preview for tsx
, js
, ts
, html
, lua
#2904
base: master
Are you sure you want to change the base?
Conversation
The reason for also adding |
tsx
, html
, lua
tsx
, js
, ts
, html
, lua
|
…n finding an unhandled formad or filetype
tsx
, js
, ts
, html
, lua
fix
: preview for tsx
, js
, ts
, html
, lua
fix
: preview for tsx
, js
, ts
, html
, lua
fix
: file preview for tsx
, js
, ts
, html
, lua
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the idea of better rendering, but I consider we shouldn't remove or change significantly the options some users may actively use. Additional modifications, e.g. replacement of handle_fallback()
with cat
or switch to html as text not as page may be useful for some users, but it has huge influence on ranger functionality, so it's better to make it as an easy-to-switch option
The previous If anything, I would add code comments to aid the users interested on re-implementing stuff. |
The fix is very simple: Instead of trusting the file mimetype, which
file
very often fail to determine accurately, we pygmentize the file based on its file extension.From: https://www.reddit.com/r/ranger/comments/16s46s4 and many other similar threads trying to achieve this.