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

Fix auto closing of < in markdown code blocks #39347

Merged
merged 2 commits into from Jan 8, 2018
Merged

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Nov 30, 2017

Fixes #30536

bug
In a markdown js codeblock, typing < auto closes to <>.

< is not an auto closing pair for js, but < is an auto closing pair for markdown

fix
Our shouldAutoClosePair check defaults to return true if no auto closing pairs match the current character. I think we should default to false instead, although I am not too familiar with this code.

Fixes microsoft#38254

**bug**
In a markdown js codeblock, typing `<` auto closes to `<>`. `<` is not an auto closing pair for js but it is for markdown

**fix**
Our `shouldAutoClosePair` check defaults to return true. I think we should default to false instead
@mjbvz mjbvz self-assigned this Nov 30, 2017
@mjbvz mjbvz added this to the December 2017 milestone Dec 4, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Dec 4, 2017

@alexandrudima Let's target this for next iteration. This PR only fixes one case of #38254

@mjbvz
Copy link
Contributor Author

mjbvz commented Dec 13, 2017

Ping @alexandrudima

@alexdima
Copy link
Member

alexdima commented Jan 8, 2018

Returning true as the default doesn't make any sense... Thank you for the fix! 👍

@alexdima alexdima merged commit 11871fb into microsoft:master Jan 8, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
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.

Fenced JavaScript in markdown adds ">" when you type "<"
2 participants