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

Code block maintenance updates #509

Merged
merged 9 commits into from Oct 27, 2017

Conversation

Projects
None yet
1 participant
@50Wliu
Member

50Wliu commented Oct 26, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

  1. Remove unused underscore-plus require
  2. Actually remove the tabindex attribute so that the code block is un-editable. This was done previously but it turned out that getting the model of the editor added it back. So now we remove it after retrieving the model.
  3. Do not render the last trailing newline of a code block.
  4. Fix debouncing of Markdown rendering when receiving grammar update events.

Alternate Designs

N/A

Benefits

Typing isn't allowed in code blocks anymore, and the last newline is removed as expected. If the preview is loaded before grammar packages finish loading, it'll receive proper tokenization once they do.

Possible Drawbacks

Hopefully none.

Applicable Issues

Supersedes and closes #425, which could have potentially left \r in the code block.
Fixes #479
Fixes #491

50Wliu added some commits Oct 26, 2017

50Wliu added some commits Oct 26, 2017

50Wliu added some commits Oct 26, 2017

Update spec for better testing
Don't know why it's failing though
@50Wliu

This comment has been minimized.

Show comment
Hide comment
@50Wliu

50Wliu Oct 26, 2017

Member

Failing spec seems to be flaky on master as well.

Member

50Wliu commented Oct 26, 2017

Failing spec seems to be flaky on master as well.

Conditionally use (unreleased) atom.grammars.onDidRemoveGrammar
Also allows us to remove onDidUpdateGrammar, since for our use case
add/RemoveGrammar gives us all the info we need

@50Wliu 50Wliu merged commit 9c12023 into master Oct 27, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@50Wliu 50Wliu deleted the wl-code-block-updates branch Oct 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment