From 9e77ee5b58b07771f582b0eb26b7ff5cb3326fa7 Mon Sep 17 00:00:00 2001 From: Matthew Fosdick Date: Mon, 24 Jun 2019 18:45:20 -0700 Subject: [PATCH] add back removed :zeroLengthStart?: true --- source/languages/cpp/generate.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/languages/cpp/generate.rb b/source/languages/cpp/generate.rb index 4035e55c..c6074639 100644 --- a/source/languages/cpp/generate.rb +++ b/source/languages/cpp/generate.rb @@ -130,6 +130,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: PatternRange.new( tag_as: "meta.head."+name, start_pattern: /\G ?/, + zeroLengthStart?: true, end_pattern: newPattern( match: @open_curly_brace.or(lookAheadFor(/;/)), tag_as: "punctuation.section.block.begin.bracket.curly."+name @@ -319,6 +320,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: PatternRange.new( # the first position start_pattern: lookAheadFor(/^/), + zeroLengthStart?: true, # ensure end never matches # why? because textmate will keep looking until it hits the end of the file (which is the purpose of this wrapper) # how? because the regex is trying to find "not" and then checks to see if "not" == "possible" (which can never happen)