Closed vmotsak closed 9 years ago
@vmotsak yeah... tests are failing on master, I updated to latest minitest and then they failed; I will be release a new point release which should fix this issue today.
@vmotsak in regards to that code... it is actually something else that is failing; they reason that is to support both old and new format of trailing dots... however that code really should not be duplicated like that.
must also support .foo.hbs.slim
etc
@vmotsak released 0.19.1
| must also support .foo.hbs.slim etc
for this case what's set in Config.slimbars_extensions .hbs.slim? .slim? but even it this case end_with? should return correct result unless it's Config.slimbars_extensions =['.slimbars'] and .foo.slimbars.hbs also should be matched.
my example was probably bad.... @vmotsak
.hbs must be just one of the extensions (as sprockets allows chaining).
e.g. .hbs.erb
or .hbs.txt
where the extension is defined as .hbs
I'm having a similar issue and I'm not sure if I've understood the fix, so to double check
I had a project (middleman) that did serve templates with .hamlbars
extension with v0.18
With v0.19 it stopped working (they were not served at all)
With v0.19.1 it is working again, but only if I name my file something.hbs.hamlbars
. something.hamlbars
will not work (and it used to work in v0.18). Is that intended?
Thanks1
@ciscou I could have potentially made an error, I will try to look into it soon!
@ciscou I can't seem to replicate the problem... is there a reproducible test case you have available ?
Are you also using the hamlbars gems? (just curious, cause if that is the case you will need both extensions with sprockets sadly).
@AlexRiedler
created sample project for above case at https://github.com/vmotsak/hbs-slimbars-118
Trying to access test.hbs.sllimbars
as
http://localhost:3000/assets/templates/test.js?body=1
shows
throw Error("Slim::Parser::SyntaxError: Unknown line indicator\n (__TEMPLATE__), Line 1, Column 0\n (function() {\n ^\n\n......
It looks like handlebars process template before slim.
Sorry.
Looks like downgrading middleman from 3.3.9 to 3.3.7 fixes the extension issue for me. Will do some further research and open an issue on their side if needed.
Thanks!
@ciscou interesting...
@vmotsak if your using slimbars, you should have have to do the extension '.slimbars' no need to do '.hbs' as well.
.hbs must be just one of the extensions (as sprockets allows chaining).
slimbars works now, so I'm closing the issue
I tried to use gem with .slimbars templates, but I'm failed.
My research lead me to this code
first it look like
ext = '\\#{ext}'
suppose to evaluate ext but it's in single quotes. also not sure what is checked after extension by regex. why it can't be replaced byPS. it looks like tests are failing on master