Skip to content

Commit

Permalink
[Enhancement] Add Support for Common 2nd Suffixes (Fix zee-editor#84) (
Browse files Browse the repository at this point in the history
…#6)

* [Enhancement] Add Support for Common 2nd Suffixes

* Remove obsolete suffixes from Python entry
  • Loading branch information
kevinmatthes authored Aug 3, 2022
1 parent 08c9f31 commit 737c317
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 6 additions & 1 deletion zee-grammar/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ impl FilenamePattern {
.as_ref()
.file_name()
.and_then(OsStr::to_str)
.map(|s| s.ends_with(suffix))
.map(|s| {
s.ends_with(suffix)
|| s.ends_with(&(suffix.to_owned() + ".bak"))
|| s.ends_with(&(suffix.to_owned() + ".in"))
|| s.ends_with(&(suffix.to_owned() + ".out"))
})
.unwrap_or(false),
Self::Name(ref expected_name) => filename
.as_ref()
Expand Down
3 changes: 0 additions & 3 deletions zee/config/config.ron
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,8 @@
Suffix(".py2"),
Suffix(".pyi"),
Suffix(".pyx"),
Suffix(".pyx.in"),
Suffix(".pxd"),
Suffix(".pxd.in"),
Suffix(".pxi"),
Suffix(".pxi.in"),
Suffix(".rpy"),
Suffix(".cpy"),
],
Expand Down

0 comments on commit 737c317

Please sign in to comment.