From e1f51badbef24425421f8999537087979a896b15 Mon Sep 17 00:00:00 2001 From: Brenton House Date: Thu, 23 Jan 2020 11:32:30 -0600 Subject: [PATCH] added support for wpath shortcut --- Alloy/commands/compile/compilerUtils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Alloy/commands/compile/compilerUtils.js b/Alloy/commands/compile/compilerUtils.js index cf5e757a0..c62b3129d 100755 --- a/Alloy/commands/compile/compilerUtils.js +++ b/Alloy/commands/compile/compilerUtils.js @@ -235,6 +235,10 @@ exports.getParserArgs = function(node, state, opts) { theValue = styler.STYLE_EXPR_PREFIX + theValue; } + if ( theValue.startsWith('~/')) { + theValue = styler.STYLE_EXPR_PREFIX + 'WPATH("' + theValue.substring(2, theValue.length) + '")'; + } + if (attrName === 'class') { if (autoStyle) { createArgs[CONST.CLASS_PROPERTY] = theValue.split(/\s+/) || [];