on master help sign in
assets: add Debian ucf backups to ignored suffixes
7c41bd7Ville Skyttä
src/assets.rs+5−2
@@ -29,15 +29,18 @@ pub struct SyntaxReferenceInSet<'a> {
29 pub syntax_set: &'a SyntaxSet,
29 pub syntax_set: &'a SyntaxSet,
30}
30}
31
31
32−const IGNORED_SUFFIXES: [&str; 10] = [
32+const IGNORED_SUFFIXES: [&str; 13] = [
33 // Editor etc backups
33 // Editor etc backups
34 "~",
34 "~",
35 ".bak",
35 ".bak",
36 ".old",
36 ".old",
37 ".orig",
37 ".orig",
38− // Debian and derivatives apt/dpkg backups
38+ // Debian and derivatives apt/dpkg/ucf backups
39 ".dpkg-dist",
39 ".dpkg-dist",
40 ".dpkg-old",
40 ".dpkg-old",
41+ ".ucf-dist",
42+ ".ucf-new",
43+ ".ucf-old",
41 // Red Hat and derivatives rpm backups
44 // Red Hat and derivatives rpm backups
42 ".rpmnew",
45 ".rpmnew",
43 ".rpmorig",
46 ".rpmorig",
tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-distnew file+1
@@ -0,0 +1 @@
1+// foo.ucf-dist (Debian ucf backup) should highlight same as foo
tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-newnew file+1
@@ -0,0 +1 @@
1+// foo.ucf-new (Debian ucf backup) should highlight same as foo
tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-oldnew file+1
@@ -0,0 +1 @@
1+// foo.ucf-old (Debian ucf backup) should highlight same as foo
tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-distnew file+1
@@ -0,0 +1 @@
1+// foo.ucf-dist (Debian ucf backup) should highlight same as foo
tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-newnew file+1
@@ -0,0 +1 @@
1+// foo.ucf-new (Debian ucf backup) should highlight same as foo
tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-oldnew file+1
@@ -0,0 +1 @@
1+// foo.ucf-old (Debian ucf backup) should highlight same as foo