Skip to content

Emmet: guaranteed applying new preferences - #8542

Closed
Denis Malinochkin (mrmlnc) wants to merge 4 commits into
microsoft:masterfrom
mrmlnc:fix-8457
Closed

Denis Malinochkin (mrmlnc) wants to merge 4 commits into
microsoft:masterfrom
mrmlnc:fix-8457

Conversation

@mrmlnc

@mrmlnc Denis Malinochkin (mrmlnc) commented Jun 29, 2016 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@msftclas

Hi Denis Malinochkin (@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

Denis Malinochkin (mrmlnc) commented Jun 30, 2016 •

Copy link
Copy Markdown
Contributor Author

Ooops, 🔮

@msftclas

Hi Denis Malinochkin (@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