Fix is in on the alpha branch.
Based on your earlier config, try this (I am not entirely sure what you are looking for, so I have just adapted your earlier post):
[pre=#2D2D2D] {
ânameâ: âphp_keywordsâ,
âopenâ: â^\s*\b(if|foreach|while)\b(?=.:$)",
âcloseâ: "^\s\b(endif\b|endforeach\b|endwhile(?=;$))â,
âiconâ: âdotâ,
âcolorâ: âbrackethighlighter.tagâ,
âstyleâ: âunderlineâ,
âlanguage_filterâ: âwhitelistâ,
âscope_excludeâ: âstringâ, âcommentâ],
âlanguage_listâ: âHTMLâ, âHTML 5â, âXMLâ, âPHPâ, âHTML+CFMLâ, âColdFusionâ, âColdFusionCFCâ],
âplugin_libraryâ: âUser.phpkeywordsâ,
âenabledâ: true
},[/pre]
A much simplier phpkeywords.py now:
[pre=#2D2D2D]def compare(name, first, second, bfr):
return âendâ + bfrfirst.begin:first.end].lower() == bfrsecond.begin:second.end].lower()[/pre]
Just to be safe, restart ST2 when you update BH to the latest commit.
Edit: The regex is a little sloppy and can be cleaned up, but it is fine for a starting point.