diff options
author | diegodox | 2021-11-04 03:24:52 +0000 |
---|---|---|
committer | GitHub | 2021-11-04 03:24:52 +0000 |
commit | 70d21a903fef3ec0787c453f369d95e5223a2656 (patch) | |
tree | 27b1461ef8bc7e530c9d19c7293a9d3241685555 /helix-term/Cargo.toml | |
parent | 5b5d1b9dfff6b522559174f7f8e99aeb82c674a9 (diff) |
Prevent preview binary or large file (#939)
* Prevent preview binary or large file (#847)
* fix wrong method name
* fix add use trait
* update lock file
* rename MAX_PREVIEW_SIZE from MAX_BYTE_PREVIEW
* read small bytes to determine cotent type
* [WIP] add preview struct to represent calcurated preveiw
* Refactor content type detection
- Remove unwraps
- Reuse a single read buffer to avoid 1kb reallocations between previews
* Refactor preview rendering so we don't construct docs when not necessary
* Replace unwarap whit Preview::NotFound
* Use index access to hide unwrap
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* fix Get and unwarp equivalent to referce of Index acess
* better preview implementation
* Rename Preview enum and vairant
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* fixup! Rename Preview enum and vairant
* simplify long match
* Center text, add docs, fix formatting, refactor
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
Diffstat (limited to 'helix-term/Cargo.toml')
-rw-r--r-- | helix-term/Cargo.toml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index 45b4eb2c..a0079feb 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -46,6 +46,8 @@ fuzzy-matcher = "0.3" ignore = "0.4" # markdown doc rendering pulldown-cmark = { version = "0.8", default-features = false } +# file type detection +content_inspector = "0.2.4" # config toml = "0.5" |