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

Cant fold custom comments #90

Open
abdelouahabb opened this issue Oct 11, 2014 · 4 comments
Open

Cant fold custom comments #90

abdelouahabb opened this issue Oct 11, 2014 · 4 comments

Comments

@abdelouahabb
Copy link

it seems the code folding for comments has a problem when it is a language mixed (html mixed)
if i add:

blockComment: ["{#", "#}"],

to the extension that make highlighting for Django templates, it dont detect the comments as folds.

https://github.com/abdelouahabb/django-brackets/blob/master/main.js

@thehogfather
Copy link
Owner

Hi I have had a look at both your extensions (ref #91). I think the problem is with the code mirror modes for the two languages. Essentially, normally, the characters that signal the beginning of a comment are tokenised as part of the comment and not a tag.

You can also see that it is not a mixed language problem because (region) codefolding works fine in html and javascript mixtures. I'll have a go at a more accurate tokenisation and see if that makes a difference.

@abdelouahabb
Copy link
Author

yes, this is what made me ask the question, i tested with html/js/css comments and they are detected, but the one i added by the extension are rejected.

@thehogfather
Copy link
Owner

django and tornado should now have brace folding enabled. Test using the latest version from git and let me know if it solves your issues.

@abdelouahabb
Copy link
Author

still the same think, the code has to be indented to have the folding,

sans titre

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