diff --git a/lib/ace/mode/sh_highlight_rules.js b/lib/ace/mode/sh_highlight_rules.js index 9dd9aa33..9d32055a 100644 --- a/lib/ace/mode/sh_highlight_rules.js +++ b/lib/ace/mode/sh_highlight_rules.js @@ -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);