Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Don't do auto-close in comments #3246

Closed
njx opened this issue Mar 26, 2013 · 7 comments
Closed

Don't do auto-close in comments #3246

njx opened this issue Mar 26, 2013 · 7 comments

Comments

@njx
Copy link
Contributor

njx commented Mar 26, 2013

  1. Turn on Edit > Auto Close Braces
  2. In a JS file, type // TODO: don't do this

Result: The ' is auto-closed, so you get an extra apostrophe.
Expected: Shouldn't auto-close in comments, at least for single-quotes. (Double quotes and parens/braces/brackets are arguably still useful, but you could argue that we should turn off all auto-closing in comments anyway.)

@ghost ghost assigned aaronshekey and njx Mar 26, 2013
@njx
Copy link
Contributor Author

njx commented Mar 26, 2013

Reviewed, low priority.

@albertxing
Copy link
Contributor

I'm currently working on this issue, and I'm wondering whether changes to third-party addon scripts (e.g. src/thirdparty/CodeMirror2/addon/edit/closebrackets.js) allowed?

Additionally, I've noticed that the extension automatch-pairs interferes with the fix because it auto-closes braces independently of CodeMirror. Is there anything we are going to do/willing to do about this?

@TomMalbran
Copy link
Contributor

If you want to change something in CodeMirror, you need to submit a pull request to the CodeMirror project: https://github.com/marijnh/CodeMirror. The submodule in Brackets is updated regularly, so the changed there land in Brackets soon enough.

That extension was done before this feature was added to the core, so it might not be needed anymore.

marijnh pushed a commit to codemirror/codemirror5 that referenced this issue Apr 3, 2013
Make exception for auto-closing single apostrophes in comments, as per
adobe/brackets#3246
@albertxing
Copy link
Contributor

Change merged into codemirror/codemirror5@c1b7ea4, needs submodule update.

@albertxing
Copy link
Contributor

Submodule updated, and the new code should now be in Brackets. If everything works, the issue can be closed.

@njx
Copy link
Contributor Author

njx commented Apr 4, 2013

FBNC to me. Marking sprint 23 just so I remember to regress it soon :)

@njx
Copy link
Contributor Author

njx commented Apr 4, 2013

Confirmed, closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants