Merge pull request #613 from gildebrand/patch-4
parseMacroSyntax accepts other characters than a-z
This commit is contained in:
@@ -12,8 +12,8 @@ function macroService() {
|
||||
|
||||
/** parses the special macro syntax like <?UMBRACO_MACRO macroAlias="Map" /> and returns an object with the macro alias and it's parameters */
|
||||
parseMacroSyntax: function (syntax) {
|
||||
|
||||
var expression = /(<\?UMBRACO_MACRO macroAlias=["']([\w\.]+?)["'][\s\S]+?)(\/>|>.*?<\/\?UMBRACO_MACRO>)/i;
|
||||
|
||||
var expression = /(<\?UMBRACO_MACRO macroAlias=["']([\s\S.]+?)["'][\s\S]+?)(\/>|>.*?<\/\?UMBRACO_MACRO>)/i;
|
||||
var match = expression.exec(syntax);
|
||||
if (!match || match.length < 3) {
|
||||
return null;
|
||||
@@ -157,4 +157,4 @@ function macroService() {
|
||||
|
||||
}
|
||||
|
||||
angular.module('umbraco.services').factory('macroService', macroService);
|
||||
angular.module('umbraco.services').factory('macroService', macroService);
|
||||
|
||||
Reference in New Issue
Block a user