-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove !!! #1270
Remove !!! #1270
Conversation
Meh. That's used in a lot of different places/engines, so I don't see that being a worth bc break |
you're so angry :p |
Though I always liked the quick But I'd really like to wait with removing this until there is at least one release, where this is deprecated, so nothing will break directly. |
@visionmedia Not angry, just arguing my case succinctly. The @silvinci the extra release really don't add any value. People don't update their code until it actually breaks. We could make it break with a nicer error message, along the lines of |
@ForbesLindesay Ah, okay then. :) I love how you care for us and have a bot helping us. :D |
They do if some software is outputting swear words to stdout/stderr without breaking anything. At least node.js core and express.js are known to do this for a few releases before breaking things. |
We're not node, it's a lot easier for people to just not update their version of jade if they have a problem. |
Agree with the change, though very unfortunate not having a deprecation warning since this will break approximately everything written with Jade. |
+1 broke all my websites since upgrade to 1.0 Matej Kramny On 7 Jan 2014, at 04:42 am, Brock Whitten notifications@github.com wrote: Agree with the change, though very unfortunate not having a deprecation — |
+1-ing doesn't help anymore. The change is already pushed to npm. ;) I'd recommend writing a quick script, that runs through all var regex = /^(?:!!!|doctype 5)\s*$/gi; |
well, had to try :). I also found that v1 gets annoyed by a space after an element produces an error (as it should, now back to designers telling them to use correct syntax.) Matej Kramny On Tuesday, 7 January 2014 at 10:43, Jan Buschtöns wrote:
|
If you find this to be an error, I suggest opening a new issue. However, I configured my editor to strip all trailing whitespace on save. |
The issue is with my designers… they tend to do silly stuff like
and leaving a space at the end of the brackets (facepalm), bad indentation etc. Matej Kramny On Tuesday, 7 January 2014 at 10:48, Jan Buschtöns wrote:
|
Haha yeah. I recommend using some sort of live-parsing. So your designers get immediate visual feedback (i.e. |
hmm i imagine it isn't worth the trouble unless it was written into jade and possibly under option as strict mode.. when i discover they do that i send them to the documentation and ask them to fix it. few weeks ago i told them i won't accept any code that is using the incorrect syntax, which seems to work. yeah when there's an error i have to remote myself to their PC and fix it manually… They're doing a good job otherwise though, check it out http://eventmost.com Matej Kramny On Tuesday, 7 January 2014 at 10:53, Jan Buschtöns wrote:
|
Ouch, don't change |
hmm thanks, will add it to their todo list :) Matej Kramny On Tuesday, 7 January 2014 at 11:03, Jan Buschtöns wrote:
|
I've prepared a patch release to restore the previous |
I entirely and full-heartedly disagree with the deprecation of
Deprecating |
Why should it be differentiated?
Doctype is a part of an output, not a header. At least, it's not a jade header. You can place doctype in the middle of the text freely.
Same for "extend", "include", "mixin" and other keywords. So what? Are they all need to be removed because they aren't tags?
And "block foobar" should mean |
Because you render starting from base templates (templates you include a doctype at the top of), and include subtemplates (templates you don't include a doctype at the top of). If you try to render starting from a subtemplate, or include a base template, you're doing something wrong, and having it look different at the top is a clear distinction.
Yeah, and then your HTML parsing of that output is going to fail. (I don't know how hard the HTML5 parser will crash if you do this; point is, it's bad HTML.)
And, further to the point that's been made in the last couple weeks (I really wish I'd caught wind of this in October, unfortunately I was busy writing Chatphrase, blissfully using |
I'm rendering "subtemplates" only, and each template is extending a base one. No includes. What exactly am I doing wrong?
My point was: doctype has nothing to do with jade, it's html header. In jade it's the same control sequence like all others.
There was no backward compatibility. I changed my templates at least two times over the last year because of jade updates. If you're worrying about compatibility, you can avoid using newer jade versions like mocha does. |
Nothing. The point is, you have a base type of Jade you start or end at, and a type of Jade you don't. One has a doctype, one doesn't, and you don't, in the same line of inclusion/extension, use another
!!!
html
head
meta(charset="utf-8")
title Example
body
p Hello world! This, and thousands of plain templates like it, have been backwards-compatible for years. True, Jade has broken BC on some specific features that some people use (like implicit inline style/script), but nothing that breaks every well-formed Jade template since the beginning, regardless of complexity. I'm in an e-mail conversation with a designer who's just learning Jade now. At this point, he's not using blocks, or extends, or inlines, or anything like that: he's just using it to block out his HTML with variables. This breaks the basics that he has just learned. |
I'm looking at one project right now... There are a base layout. There are a couple of base templates inherited from that layout. There are templates inherited from base templates. There are mixins in separate files. I fail to see why a base layout should look any different than all other files.
How is it differ from implicit inline scripts you mentioned? I saw them used very widely as well. |
See the re-worded explanation.
Usually sites will do scripts and styles in separate files, and look at inlines as bad practice. |
Ok, correct me if you think this is wrong. This deprecation is bad for new people coming to Jade (post v1) as it seems likely they will run into either documentation or code that has the This deprecation punishes early adopters (pre v1) who almost certainly have applications that this will needlessly break. Considering that this makes up 100% of Jade users, the question must be asked, who does it benefit to have this removed? My best guess is that it is for a long term benefit by reducing the API surface area. If so, can someone somehow quantify this benefit? Is there something in the roadmap that will need the From mine, and what appears to be others perspective, the cost vs benefit was not properly weighted before making this change, and it would be better for everyone involved if the |
It does hurt many early adopters, but those people had plenty of time to voice their concerns before the code was released. It's too late now for all the reasons I have discussed in #1374. If you genuinely believe that this deprecation was not handled properly and that this represents a problem, I have outlined what needs to be done to create a version that properly documents the breaking features in a pre |
This is very disappointing. I hoped you would be more reasonable. |
And what is your source for this conclusion, exactly? What real person have you spoken to that had a hard time with this syntax? Of the people I've shown Jade, nobody has had problems understanding the idea of
|
The
!!!
syntax as a shorthand fordoctype
is a really terrible mistake. It's hardly any faster to type and much harder to read when people are seeing a jade template for the first time.The
5
as a shorthand forhtml
is just ludicrous. It makes even less sense now as5
is going to be the "perpetual" version for html.