detect comments with no whitespace after //
authorFelix Fietkau <nbd@openwrt.org>
Sun, 17 Feb 2013 22:37:45 +0000 (23:37 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 17 Feb 2013 22:37:45 +0000 (23:37 +0100)
data/gen-common.pm

index 38691fb..60d73e8 100644 (file)
@@ -22,7 +22,7 @@ $prefix eq 'ctl_' and $ctl = 1;
 sub get_json() {
        local $/;
        my $json = <>;
 sub get_json() {
        local $/;
        my $json = <>;
-       $json =~ s/^\s*\/\/ .*$//mg;
+       $json =~ s/^\s*\/\/.*$//mg;
        return decode_json($json);
 }
 
        return decode_json($json);
 }