To satisfy Ruby 1.8.7, use look-ahead instead of look-behind

This commit is contained in:
maul.esel 2013-06-15 18:19:52 +02:00
parent 0fa03d2651
commit 99721ee8aa
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ module Jekyll
pos = 0 pos = 0
# ensure the entire markup string from start to end is valid syntax, and params are separated by spaces # ensure the entire markup string from start to end is valid syntax, and params are separated by spaces
full_matcher = Regexp.compile('\A\s*(?:(?<=\s|\A)' + MATCHER.to_s + '\s*)*\z') full_matcher = Regexp.compile('\A\s*(?:' + MATCHER.to_s + '(?=\s|\z)\s*)*\z')
if not markup =~ full_matcher if not markup =~ full_matcher
raise SyntaxError.new <<-eos raise SyntaxError.new <<-eos
Invalid syntax for include tag: Invalid syntax for include tag: