mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
fix(previewer): improve binary mime type check (#3083)
* fix(previewer): improve binary mime type check
Problem: mime type for a ts/js file can either return `text/plain` or
`application/javascript` based on the contents of the file.
Previously, this meant `application/javascript` would be considered
"possibly binary". This, in conjunction with how `vim.filetype.match`
does not give a result for a filename that ends in `.ts`, would lead to
a typescript file taking the path of `check_mime_type` and eventually
`mime_hook`.
Solution: Include `application/javascript` as a non-binary file type
during mime type check.
* [docgen] Update doc/telescope.txt
skip-checks: true
---------
Co-authored-by: Github Actions <actions@github>
(cherry picked from commit fac83a556e)
This commit is contained in:
+3
-3
@@ -2296,9 +2296,9 @@ utils.transform_path({opts}, {path}) *telescope.utils.transform_path()*
|
||||
|
||||
|
||||
Parameters: ~
|
||||
{opts} (table) The opts the users passed into the picker. Might
|
||||
contains a path_display key
|
||||
{path} (string?) The path that should be formatted
|
||||
{opts} (table) The opts the users passed into the picker. Might
|
||||
contains a path_display key
|
||||
{path} (string|nil) The path that should be formatted
|
||||
|
||||
Return: ~
|
||||
string: The transformed path ready to be displayed
|
||||
|
||||
Reference in New Issue
Block a user