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

No syntax highlighting for CSS or JavaScript in cfoutput block #101

Open
KamasamaK opened this issue Jan 6, 2018 · 1 comment
Open

No syntax highlighting for CSS or JavaScript in cfoutput block #101

KamasamaK opened this issue Jan 6, 2018 · 1 comment

Comments

@KamasamaK
Copy link
Contributor

A <cfoutput> block within a <script> or <style> block loses syntax highlighting.

Example:
sublimetext-syntax-javascript-cfoutput

@jcberquist
Copy link
Owner

Thanks @KamasamaK, I have been waiting for someone to raise this issue since I first put the package up 😀 . Perhaps I should have put it into a known issues section.

This is a (side) effect of the way I chose to implement the <cfoutput> tag. I wanted to distinguish between # characters inside and outside of <cfoutput> blocks, but the side effect of this is that inside of <cfoutput> blocks the scoping context goes back to the base HTML context. This works in most cases (for me, at least) and I decided I would live with this issue in order to retain the ability to distinguish # uses inside and outside of <cfoutput>.

In the past I would have just left it here, as I think the only solution for improving it is a custom HTML syntax that I would have to include in the package. I was not eager to maintain my own version of the HTML syntax. But it might be a lot easier to do that now, by using @Thom1729's YAML-Macros package to extend the base HTML syntax without having to create or maintain an entire syntax file. I am already using his package to build a separate CFScript syntax for when script is used in <cfset> tags and the like. I will take a look at that when I have some time.

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