Skip to content

Fix auto-indent regex rules #562

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 43 commits into from
Jan 10, 2018
Merged

Fix auto-indent regex rules #562

merged 43 commits into from
Jan 10, 2018

Conversation

MikhailArkhipov
Copy link

Fix #385, #141

Also fixes case when ENTER at | in

# abc |cde

did not insert # to yield

# abc 
# cde

@DonJayamanne
Copy link

@MikhailArkhipov
Please could you add some unit tests for this.
We have tests for these indentation rules today in src/test/format/extension.onTypeFormat.test.ts

@DonJayamanne DonJayamanne self-requested a review January 9, 2018 23:51
@DonJayamanne DonJayamanne added this to the February 2018 milestone Jan 9, 2018
@MikhailArkhipov
Copy link
Author

MikhailArkhipov commented Jan 9, 2018

Actually, I can't find a way to simulate Enter (or typing). It is not equivalent to calling onTypeFormattingProvider, OnEnterRule is executed inside the editor. document.edit does not cause VSC to invoke rules. It seems that keyboard typing does not expose hooks and does not map to commands like in big VS.

@codecov
Copy link

codecov bot commented Jan 10, 2018

Codecov Report

Merging #562 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #562   +/-   ##
=======================================
  Coverage   56.29%   56.29%           
=======================================
  Files         212      212           
  Lines        9975     9975           
  Branches     1754     1754           
=======================================
  Hits         5615     5615           
  Misses       4355     4355           
  Partials        5        5
Impacted Files Coverage Δ
src/client/extension.ts 93.95% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d421dd3...9800c4a. Read the comment docs.

@MikhailArkhipov MikhailArkhipov merged commit fb99423 into microsoft:master Jan 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
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.

Auto-Indentation doesn't work after comment
3 participants