Skip to content

fix: incorrect detection of editor mode #234

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

Merged
merged 1 commit into from
Jul 1, 2020
Merged

Conversation

smeijer
Copy link
Member

@smeijer smeijer commented Jul 1, 2020

What:
fix editor mode detection for automated formatting

Why:
this fix exists on live but wasn't backported to develop yet

How:
For some reason, options.mode is sometimes a string like html, and sometimes an object like { name: 'html' }. Fix is a simple one-liner:

const mode = cm.options.mode.name || cm.options.mode;

Checklist:

  • Tests
  • Ready to be merged

@smeijer smeijer added the bug Something isn't working label Jul 1, 2020
@smeijer smeijer self-assigned this Jul 1, 2020
@smeijer smeijer merged commit dc6bd70 into develop Jul 1, 2020
@smeijer smeijer deleted the feature/fix-cm-mode branch July 1, 2020 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant