Package: vim-runtime Version: 2:7.4.430-1 Severity: wishlist File: /usr/share/vim/vim74/syntax/robots.vim Tags: patch
Here's a simple patch that does the job. I kept the changes to a minimum, piggy-backing on the "Disallow" keyword instead of creating another one -- hope that's okay. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (x86_64) Foreign Architectures: amd64 Kernel: Linux 3.16-2-amd64 (SMP w/3 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash vim-runtime depends on no packages. Versions of packages vim-runtime recommends: ii vim-gtk [vim] 2:7.4.430-1 ii vim-tiny 2:7.4.430-1 vim-runtime suggests no packages. -- no debconf information
>From a46a6d6992a5187d80fb574e5ffe02abb8a905aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <fbri...@fbriere.net> Date: Tue, 30 Sep 2014 18:31:50 -0400 Subject: [PATCH] syntax/robots: Match "allow" directive in addition to "disallow" --- runtime/syntax/robots.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/syntax/robots.vim b/runtime/syntax/robots.vim index 066628b..8ae6731 100644 --- a/runtime/syntax/robots.vim +++ b/runtime/syntax/robots.vim @@ -30,11 +30,11 @@ syn match robotsDelimiter ":" " The keywords " User-agent syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]" -" Disallow -syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]" +" Allow / Disallow +syn match robotsDisallow "^\([Dd][Ii][Ss]\)\?[Aa][Ll][Ll][Oo][Ww]" " Disallow: or User-Agent: and the rest of the line before an eventual comment -synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter +synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^\([Dd][Ii][Ss]\)\?[Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter " Some frequent things in comments syn match robotsUrl "http[s]\=://\S*" -- 2.1.1