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

comment-region (and comment-line in Emacs 25) doesn't work on quoted lines #117

Closed
cpitclaudel opened this issue Mar 12, 2016 · 2 comments
Closed

Comments

@cpitclaudel
Copy link

Tested in Emacs 24.5 and 25:

(with-current-buffer (get-buffer-create "*bug*")
  (erase-buffer)
  (markdown-mode)
  (save-excursion (insert "> test\n"))
  (comment-or-uncomment-region (point-at-bol) (point-at-eol))
  (pop-to-buffer (current-buffer)))

This goes from

> test

to

<!-- > test -->

(and the syntax highlighting is wrong), then to (repeating C-x C-; on that same first line)

<!-- <\!-- > test -\-> -->

and so on.

Let me know if I can provide more info! Thanks for the cool mode.

@jrblevin
Copy link
Owner

Thanks for reporting this. The inner > was being mistaken for the comment end because a space is allowed in comment closing (i.e., -- > could be a valid closing, but not in this case because the hyphens are part of the opening). As a result, the syntax table properties were incorrect and hence so was the highlighting and uncomment behavior.

I think it is fixed now, but please reopen if you find otherwise.

@cpitclaudel
Copy link
Author

Brilliant, thanks!

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

2 participants