Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Template names starting with _ #199

Closed
talha-asad opened this issue Feb 1, 2016 · 12 comments
Closed

Template names starting with _ #199

talha-asad opened this issue Feb 1, 2016 · 12 comments
Labels

Comments

@talha-asad
Copy link

Create a template file, such as _test.tpl.jade. This template cannot be included using +_test but instead with +test. Looks like a bug.

@mquandalle is this, being done on purpose?

@mquandalle
Copy link
Owner

No, I would merge a PR fixing that.

@talha-asad
Copy link
Author

Okay please assign this the bug label and i will try fixing this.

@mquandalle mquandalle added the bug label Feb 1, 2016
@talha-asad
Copy link
Author

Can you give me a pointer, where i should start working on this? I am now testing it with a standard meteor html template, just to make sure this is not being caused by meteor itself.

@mquandalle
Copy link
Owner

The template name is calculated here.

@talha-asad
Copy link
Author

Thanks.

@talha-asad
Copy link
Author

Okay this works fine with Meteor simple html templates. I am going to try and fix this in your package.

@mquandalle
Copy link
Owner

I think you also need to add _ to the regex that detects “user-components” here.

@talha-asad
Copy link
Author

Yes makes sense, thanks.

@talha-asad
Copy link
Author

Sorry @mquandalle. Seems this works already, it wasn't working for me as i renamed a bunch of template names to start with _ and apparently meteor didn't recompile the spacebar version of it. So the bug is maybe that. And the component regex probably needs to support template names starting with _.

@mquandalle
Copy link
Owner

Ok, I understand the issue, will work on a fix.

@mquandalle
Copy link
Owner

Actually underscores are already supported (from the \w symbol in the regex), so it is only a problem of cache invalidation when you renamed your jade files.

@talha-asad
Copy link
Author

Makes sense. Thanks for the quick fix 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants