Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/issue 546 less variables #549

Merged
merged 3 commits into from
Apr 7, 2015

Conversation

cognivator
Copy link

Proposed fix for setVariables Filter not resolving LESS variables (i.e. with "@" prefix) properly. ( #546 )

Modified the RegExp expression in this source in setVariables,

      angular.forEach(sortedVariables, function(variable) {
        str = str.replace(new RegExp('\\$' + variable.name, 'g'), variable.value);
      });

to this,

      angular.forEach(sortedVariables, function(variable) {
        str = str.replace(new RegExp('\[\$\@]' + variable.name, 'g'), variable.value);
      });

Created new specs for the angular unit tests.

cognivator added 3 commits April 3, 2015 14:54
 - added unit tests for LESS variables to the setVariables filter specs
 - separated setVariables filter specs into three describe groups:
   -- incomplete parameters
   -- SASS / SCSS "$" variables
   -- LESS "@" variables
 - modified RegEx definition in setVariables filter to handle both SASS / SCSS "$" variable prefix, and LESS "@" variable prefix.

 test:angular:unit PASSING.
junaidrsd pushed a commit that referenced this pull request Apr 7, 2015
…bles

Features/issue fixes #546 less variables
@junaidrsd junaidrsd merged commit 876bd14 into SC5:dev Apr 7, 2015
@cyberixae cyberixae added this to the 0.3.9 milestone Apr 7, 2015
@cognivator cognivator deleted the features/issue-546_less-variables branch April 7, 2015 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants