From bf14f426256f7081937f9cea4da895cabe8ede97 Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Mon, 9 Nov 2020 13:54:22 +0900 Subject: [PATCH] Add support for long options --- lib/rouge/lexers/batchfile.rb | 3 ++- spec/visual/samples/batchfile | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rouge/lexers/batchfile.rb b/lib/rouge/lexers/batchfile.rb index 54a973d633..cc61d85033 100644 --- a/lib/rouge/lexers/batchfile.rb +++ b/lib/rouge/lexers/batchfile.rb @@ -79,6 +79,7 @@ def self.attributes state :basic do # Comments rule %r/@?\brem\b.*$/i, Comment + # Empty Labels rule %r/^::.*$/, Comment @@ -105,7 +106,7 @@ def self.attributes end end - rule %r/([\/\-+][a-z]+)\s*/i, Name::Attribute + rule %r/((?:[\/\+]|--?)[a-z]+)\s*/i, Name::Attribute mixin :expansions diff --git a/spec/visual/samples/batchfile b/spec/visual/samples/batchfile index aa9d255bea..95495fdc03 100644 --- a/spec/visual/samples/batchfile +++ b/spec/visual/samples/batchfile @@ -35,3 +35,4 @@ echo ^Hello echo Bye goto :eof :a +streamlink --http-header "User-Agent: test" "https://example.com/master.m3u8" best -o output.ts