brackets-code-folding icon indicating copy to clipboard operation
brackets-code-folding copied to clipboard

Cant fold custom comments

Open abdelouahabb opened this issue 10 years ago • 4 comments

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

abdelouahabb avatar Oct 11 '14 22:10 abdelouahabb

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.

thehogfather avatar Oct 15 '14 07:10 thehogfather

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.

abdelouahabb avatar Oct 15 '14 14:10 abdelouahabb

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.

thehogfather avatar Oct 21 '14 23:10 thehogfather

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

sans titre

abdelouahabb avatar Oct 22 '14 03:10 abdelouahabb