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

[CLOSED] Toggle Block Comment doesn't work if the open/close delimiters are the same #2876

Open
core-ai-bot opened this issue Aug 29, 2021 · 6 comments

Comments

@core-ai-bot
Copy link
Member

Issue by peterflynn
Thursday Mar 07, 2013 at 00:31 GMT
Originally opened as adobe/brackets#3057


  1. Add this line to the CoffeeScript section of languages.json: "blockComment": ["###", "###"],
  2. Open a .coffee file with these contents:
foo = 42
bar = true
baz = "hello"
number = -42 if bar
square = (x) -> x * x
  1. Select the middle 3 lines and Toggle Block Comment
  2. Immediately Toggle Block Comment again
  3. Undo back to clean state
  4. Repeat step 3
  5. Select all the lines, including the ### lines, then Toggle Block Comment again
  6. Undo back to a clean state
  7. Select just one line (without including newlines) and Toggle Block Comment
  8. Either (a) immediately toggle again, or (b) re-select the whole line to include delimiters and then toggle

Result:
4 - closing delimiter isn't removed
7 - comment is wrapped in a second pair of ### lines
10 - one "#" is removed from the opening ###, but nothing else changes

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Thursday Mar 07, 2013 at 00:31 GMT


@TomMalbran interested in digging back into the block comment code at all? :-)

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Mar 07, 2013 at 00:36 GMT


Sure. I'll take a look later today.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Mar 07, 2013 at 23:07 GMT


By the way, you need to add lineComment: "#" too, to get the same results as 10.

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Mar 11, 2013 at 18:07 GMT


Reviewed. Marking medium priority. Thanks for fixing this Tom.

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday May 19, 2014 at 23:33 GMT


FBNC to@peterflynn - this finally landed.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Saturday Jun 06, 2015 at 20:10 GMT


I am going to close this, since it does work.

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

No branches or pull requests

1 participant