From 457ffbf3ee02b1b6f57eacb33df44c80f4bf9d71 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sun, 9 Apr 2017 18:40:31 +0200 Subject: allow "-" in Haml tags --- Changes.textile | 1 + lib/coderay/scanners/haml.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changes.textile b/Changes.textile index d77cff2..6b44854 100644 --- a/Changes.textile +++ b/Changes.textile @@ -5,6 +5,7 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release h2. Changes in 1.1.2 * C++ scanner: Added C++11 keywords. [#195, thanks to Johnny Willemsen] +* Haml scanner: Allow @-@ in tags. h2. Changes in 1.1.1 diff --git a/lib/coderay/scanners/haml.rb b/lib/coderay/scanners/haml.rb index 5433790..d516ba9 100644 --- a/lib/coderay/scanners/haml.rb +++ b/lib/coderay/scanners/haml.rb @@ -75,7 +75,7 @@ module Scanners tag = false - if match = scan(/%[\w:]+\/?/) + if match = scan(/%[-\w:]+\/?/) encoder.text_token match, :tag # if match = scan(/( +)(.+)/) # encoder.text_token self[1], :space -- cgit v1.2.1