atuttle / atom-language-cfml

:space_invader: A CFML Language for the Atom Editor
38 stars 24 forks source link

Add new `html-cfml-injection` grammar to fix highlighting within normal strings #66

Closed elpete closed 8 years ago

elpete commented 8 years ago

I realize I could push this directly on to master, but I'd appreciate another set of eyes, at least.

This pull request introduces a new grammar html-cfml-injection. This grammar injects itself in to html string, looks for hash signs (#...#), and tokenizes the contents between the hash signs as cfscript.

One thing it does not (yet) do is look and make sure the hash signs are inside a <cfoutput> tag pair first.

Tests are passing, but I'd love a beta round before pushing this out on everyone.

Fixes #53, potentially #45.

elpete commented 8 years ago

I should mention that the test that is still failing is not related to this pull request (and is my next thing to tackle.)

atuttle commented 8 years ago

I'd love to help beta test this for you but I'm swamped at the moment. Hopefully someone else can jump in to help!

elpete commented 8 years ago

To beta test:

  1. Clone my repo and branch.
  2. From the command line, navigate to the downloaded repo.
  3. Type apm link.
  4. This version of the package will override the already installed version (no need to disable or uninstall)
KrunchMuffin commented 8 years ago

@elpete Linking C:\Users\ICG\.atom\packages\language-cfml to C:\Users\ICG\Documents\atom-language-cfml failed: EEXIST, file already exists 'C:\Users\ICG\Documents\atom-language-cfml'

jcberquist commented 8 years ago

Just a thought: ultimately wouldn't you want to inject source.cfml anywhere inside of an html tag, and not just inside of attribute strings? (I realize this goes beyond the issue at hand.) What about using a selector of meta.tag - (meta.tag.any.cfml | meta.tag.other.cfml)?

elpete commented 8 years ago

Good point, @jcberquist. I'll add a test case showing that and add that in.

elpete commented 8 years ago

Thanks for the feedback everyone. I've created new, more specific issues where this pull request does not fix the specific problem, but, for the most part, it seems to be fixing a lot of issues.

Thanks especially to @tjbenton for his help testing this through its various iterations.

elpete commented 8 years ago

@atuttle I have no idea how to cut a release for this. Do you have a guide or something like that? Or does it have to be done by you?

atuttle commented 8 years ago

I don't think I can delegate publishing releases to apm, so for now I'll handle it. Just ping me any time it's needed. I do follow all of the conversations in the bugs, too. :)

Preparing and tagging a new version ✓
Pushing v0.11.0 tag ✓
Publishing language-cfml@v0.11.0 ✓