In a html document the <style> tag seems to be included in the scope of source.css.embedded.html whereas surely it isn't css at all, only the contents between the tag are css.
Is there an easy way for me to fix this?
Thanks
Ed
In a html document the <style> tag seems to be included in the scope of source.css.embedded.html whereas surely it isn't css at all, only the contents between the tag are css.
It's a known issue with the HTML grammar; I've been trying to work out in my head how to rearrange the HTML grammars to be less numerous etc. Once the best approach is figured out they just need to be re- written. In other words it could be fixed, but probably best to put the effort toward a new grammar.
There is a grammar that I made as a proof of concept in the repository Experimental HTML; but it's highly strict, and only supports XHTML 1.0 Strict. On the flipside if your using that it works pretty well. :)
The same problem goes for the <script> tag.
I had a look at the Experimental HTML grammar (http:// anon:anon@macromates.com/svn/Bundles/trunk/Bundles/Experimental% 20HTML.tmbundle/Syntaxes/XHTML%201.0.tmLanguage), it's interesting... (Even thought it's 10 times bigger) :]
Le 11 août 06 à 19:49, Michael Sheets a écrit :
In a html document the <style> tag seems to be included in the scope of source.css.embedded.html whereas surely it isn't css at all, only the contents between the tag are css.
It's a known issue with the HTML grammar; I've been trying to work out in my head how to rearrange the HTML grammars to be less numerous etc. Once the best approach is figured out they just need to be re-written. In other words it could be fixed, but probably best to put the effort toward a new grammar.
There is a grammar that I made as a proof of concept in the repository Experimental HTML; but it's highly strict, and only supports XHTML 1.0 Strict. On the flipside if your using that it works pretty well. :)
Urbanose
The experimental html bundle is great, and I'm all for the sctrictness, except that I'm using kid templates which have an expanded namespace (additional attributes like py:layout="blah").
Does xhtml strict allow an expanded namespace (properly declared with xmlns:py="http://purl.org/kid/ns#%22)?
Either way is it possible/reasonably easy to set up the new grammar to accept them? (Possibly by me hacking my local version of it?)
Incidentally, this is all because I set up a command that uses csstidy to reformat my css code and it doesn't like receiving the <script> tag. I could just always select the css I want formatted but I'm proactively lazy.
Thanks
Ed
On 8/11/06, Michael Sheets mummer@whitefalls.org wrote:
In a html document the <style> tag seems to be included in the scope of source.css.embedded.html whereas surely it isn't css at all, only the contents between the tag are css.
It's a known issue with the HTML grammar; I've been trying to work out in my head how to rearrange the HTML grammars to be less numerous etc. Once the best approach is figured out they just need to be re- written. In other words it could be fixed, but probably best to put the effort toward a new grammar.
There is a grammar that I made as a proof of concept in the repository Experimental HTML; but it's highly strict, and only supports XHTML 1.0 Strict. On the flipside if your using that it works pretty well. :)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 14/8/2006, at 11:48, Ed Singleton wrote:
[...] Incidentally, this is all because I set up a command that uses csstidy to reformat my css code and it doesn't like receiving the <script> tag. I could just always select the css I want formatted but I'm proactively lazy.
You could also have the command strip them and re-add them.
But including the style (and script etc.) tags in the scope is (as Michael implied) something we consider a design mistake.
It’s just that “fixing” it would break the current themes, so I/we have so far been reluctant to do it.
On 8/14/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 14/8/2006, at 11:48, Ed Singleton wrote:
[...] Incidentally, this is all because I set up a command that uses csstidy to reformat my css code and it doesn't like receiving the <script> tag. I could just always select the css I want formatted but I'm proactively lazy.
You could also have the command strip them and re-add them.
I never thought of that. Thanks.
I guess that's why it's aways a good idea to give people the problem you wish to solve, rather than the specific details ;)
But including the style (and script etc.) tags in the scope is (as Michael implied) something we consider a design mistake.
It's just that "fixing" it would break the current themes, so I/we have so far been reluctant to do it.
Understood. Could it be an optional fix so that people can have a go at using and at fixing other bundles that depend on it?
Ed