diff --git a/src/assets.rs b/src/assets.rs index 1bfe4f6d..94adf534 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -29,15 +29,18 @@ pub struct SyntaxReferenceInSet<'a> { pub syntax_set: &'a SyntaxSet, } -const IGNORED_SUFFIXES: [&str; 10] = [ +const IGNORED_SUFFIXES: [&str; 13] = [ // Editor etc backups "~", ".bak", ".old", ".orig", - // Debian and derivatives apt/dpkg backups + // Debian and derivatives apt/dpkg/ucf backups ".dpkg-dist", ".dpkg-old", + ".ucf-dist", + ".ucf-new", + ".ucf-old", // Red Hat and derivatives rpm backups ".rpmnew", ".rpmorig", diff --git a/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-dist b/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-dist new file mode 100644 index 00000000..c9281d67 --- /dev/null +++ b/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-dist @@ -0,0 +1 @@ +// foo.ucf-dist (Debian ucf backup) should highlight same as foo diff --git a/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-new b/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-new new file mode 100644 index 00000000..f5def9e3 --- /dev/null +++ b/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-new @@ -0,0 +1 @@ +// foo.ucf-new (Debian ucf backup) should highlight same as foo diff --git a/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-old b/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-old new file mode 100644 index 00000000..f4c997a7 --- /dev/null +++ b/tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-old @@ -0,0 +1 @@ +// foo.ucf-old (Debian ucf backup) should highlight same as foo diff --git a/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-dist b/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-dist new file mode 100644 index 00000000..733d0e44 --- /dev/null +++ b/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-dist @@ -0,0 +1 @@ +// foo.ucf-dist (Debian ucf backup) should highlight same as foo diff --git a/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-new b/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-new new file mode 100644 index 00000000..595c0070 --- /dev/null +++ b/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-new @@ -0,0 +1 @@ +// foo.ucf-new (Debian ucf backup) should highlight same as foo diff --git a/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-old b/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-old new file mode 100644 index 00000000..38d47380 --- /dev/null +++ b/tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-old @@ -0,0 +1 @@ +// foo.ucf-old (Debian ucf backup) should highlight same as foo