Talesoft / tale-jade

A complete and fully-functional implementation of the Jade template language for PHP
http://jade.talesoft.codes
MIT License
88 stars 10 forks source link

Blockquote tags confused for blocks cause exceptions #95

Closed jaydenseric closed 8 years ago

jaydenseric commented 8 years ago

Using:

blockquote Quote here

Causes the following error:

Tale\Jade\Compiler\Exception

Failed to compile Jade: Failed to parse Jade: Blocks outside a mixin always need a name

The following however works as expected:

#{blockquote} Quote here

The parser seems to be confusing blockquote for block, causing the error.

This is a doozy little bug that really confused me for a while.

TorbenKoehn commented 8 years ago

Interesting.

I think this is directly related to the space-at-the-end bug.

The new lexer already has all that stuff fixed, but I can't merge it in right now ;(

Fixing it right now.

jaydenseric commented 8 years ago

Good to know, thanks for the speedy response!

TorbenKoehn commented 8 years ago

Dumb auto-close. Can you pull master and tell me if it's fixed for you?

jaydenseric commented 8 years ago

Just worked out how to pull master using Composer.

blockquote.test Test

Works fine.

#{'blockquote'}.test Test

Does not. I guess this is a separate issue, a difference with Node Pug? It works in the online demo.

I think I incorrectly stated earlier that #{blockquote} Quote here works. It did prevent the original issue though.

TorbenKoehn commented 8 years ago

I don't even know the #{'blockquote'}.test Test-stuff, is that some kind of new tag interpolation of Pug or something? :)

afaik neither Pug nor Tale Jade has tag interpolation, but feel free to prove me wrong haha

So, is your problem solved now?

jaydenseric commented 8 years ago

Yes! Thanks :)

When do you think this will be merged as a stable release? Our site will be in production within the next few weeks and it would be nice to lock a version in Composer.

TorbenKoehn commented 8 years ago

In a few minutes.

TorbenKoehn commented 8 years ago

1.4.3 is released