This is a bit of a call out for help <https://gith...
# cfml-general
g
This is a bit of a call out for help https://github.com/cfmleditor/tree-sitter-cfml does a pretty good job now of parsing quite a bit of CFML / CFSCRIPT, but I'm stuck on use of a single # (hash)
👍🏼 1
m
Yeah that's a tough use case. I'm still in my devs' ears about our parsing for color coding breaking on a single instance of #. Specifically when I use HTMX in a cfm file.
g
Maybe Adobe could help with the creation of a tree-sitter syntax for CF ?
@Mark Takata (Adobe) perhaps you could help me with some examples of syntax that's failing for you so I can use it as a test case ?
a few spring to mind, are they always followed by a a-z0-9 ? href="#test" style="color: #ccc" ( with or without the ; ) <style> #id { } </style> $("#id") // or similar
m
It would be something like: <button name=“abutton” hx-target=“#viewport”>button text</button> Most cf parsers hose everything after the hashtag text. Issue I think most parsers don’t detect that the single hash is inside of a valid cf output tag (whatever it is, cfloop, cfoutput, etc). They just see a single hashtag inside a quote in HTML and assume it is supposed to be a CFML variable