fix highlighting of indented bash heredocs

This commit is contained in:
nightwing 2015-01-29 19:41:40 +04:00
commit 42b43b1fbe

View file

@ -104,7 +104,7 @@ var ShHighlightRules = function() {
token : "keyword.operator"
}, {
stateName: "heredoc",
regex : "(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
onMatch : function(value, currentState, stack) {
var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
var tokens = value.split(this.splitRegex);