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

Mixing Blade and HTML Comments #43

Closed
uzegonemad opened this issue Aug 12, 2013 · 6 comments · Fixed by #48
Closed

Mixing Blade and HTML Comments #43

uzegonemad opened this issue Aug 12, 2013 · 6 comments · Fixed by #48

Comments

@uzegonemad
Copy link
Contributor

If I place HTML comments inside Blade comments, I lose syntax highlighting.

{{--
<!-- Some HTML Comment -->
@include('something')
--}}

screen shot 2013-08-12 at 2 27 16 pm

@Medalink
Copy link
Owner

I can look into this but is there really a need to do this? If you want to have HTML comments like that just put them before blade.

@uzegonemad
Copy link
Contributor Author

In some cases, it is useful to comment an entire block, which might contain HTML comments.

Something like...

{{-- TODO: add debug output
<div class="debug">
    @if (true == false)
    Some debug info here
    @endif
</div><!-- /.debug -->
--}}

Although that said, I did just notice a separate issue where only the first line of a multiline comment will be formatted.

@Medalink
Copy link
Owner

Alright, I will look into it.

@uzegonemad
Copy link
Contributor Author

Thanks! And thanks for all your hard work.

@bschnur
Copy link

bschnur commented Oct 20, 2013

I experience this issue even with blocks that don't contain HTML comments.

image

@gin93r
Copy link

gin93r commented Jan 15, 2014

This pattern will capture comments including multiple lines: (\{\{--[\s\S]*--\}\})

However, the first part of the comment {{- is being overridden by at least the constants pattern. Same as the closing }}. The second dash in the first bracket group and both dashes in the closing bracket group I think are also being overridden. I don't know if that helps. My regex kungfu is inferior.

It would also appear that anything on the same lines as the brackets are matching other patterns.

image

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

Successfully merging a pull request may close this issue.

4 participants