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

Emmet: guaranteed applying new preferences #8542

Closed
wants to merge 4 commits into from
Closed

Emmet: guaranteed applying new preferences #8542

wants to merge 4 commits into from

Conversation

mrmlnc
Copy link
Contributor

@mrmlnc mrmlnc commented Jun 29, 2016

Source: #8457

I found a problem with cancelling settings.

Steps to Reproduce:

  1. Open VS Code

  2. Add to settings:

    "emmet.syntaxProfiles": {
      "html": {
        "attr_case": "upper"
      }
    }
  3. Type .test and press tab to expand. Settings are applied. Result: <div CLASS="test"></div>

  4. Delete added settings.

  5. Type .test and press tab to expand, the setting doesn't apply. Result: <div CLASS="test"></div>

2016-06-30_00-06-28

Why is it so simple?

The method loadPreferences only works with the documented values. Undocumented value not supported. An example of undocumented value: less.propertyEnd — these values are hidden in Emmet. Because it is not needed for users.

Why deleted condition to apply syntax profiles?

Here it is superfluous. Just got the keys and nothing more if the editor has no settings:

loadProfiles: function(profiles) {
    profiles = utils.parseJSON(profiles);
    Object.keys(profiles).forEach(function(name) {
        profile.create(name, normalizeProfile(profiles[name]));
    });
}

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @egamma and @alexandrudima to be potential reviewers

@msftclas
Copy link

Hi @mrmlnc, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@mrmlnc mrmlnc changed the title Emmet: guaranteed applying new settings Emmet: guaranteed applying new preferences Jun 29, 2016
@mrmlnc mrmlnc closed this Jun 30, 2016
@mrmlnc mrmlnc deleted the fix-8457 branch June 30, 2016 00:26
@mrmlnc mrmlnc restored the fix-8457 branch June 30, 2016 01:05
@mrmlnc
Copy link
Contributor Author

mrmlnc commented Jun 30, 2016

Ooops, 🔮

@mrmlnc mrmlnc reopened this Jun 30, 2016
@msftclas
Copy link

Hi @mrmlnc, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants