Skip to content
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

Rendering wrong partial when it has similar names #20

Open
vebersol opened this issue Jul 29, 2014 · 2 comments
Open

Rendering wrong partial when it has similar names #20

vebersol opened this issue Jul 29, 2014 · 2 comments
Labels

Comments

@vebersol
Copy link

I'm using partials as components and sometimes it has a prefix on it, per example:

  • box1_example1
  • box1_example2

Sometimes, it renders box_example_2 in place of box_example_1. It seems that it doesn't get the name after underscore.

I've tried to use "-" instead of "_" and got the same issue.

@mikeumus mikeumus added the bug label Apr 17, 2016
@mikeumus
Copy link
Member

mikeumus commented Apr 17, 2016

+1, I can vouch for this. It happened to me recently working on betabulls.docpad. I think it was the two "case-studies" partials here that mixed up:

But this is what we have deployed now and I think it's working:

Maybe try out the above linked approach @vebersol till this is patched.
Name one with a "-" and the other with a "_". It's a weak fix but might work for now. :/

@yucho
Copy link

yucho commented Aug 25, 2016

I had the same issue as well. I think it has to do with fuzzyFindOne(partialFuzzyPath) matching filenames very lazily. If partials filename consists of multiple words delimited by dash or underscore and you call @partial('keyword'), and if one of the words is keyword, then partial will fetch that file.

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

No branches or pull requests

3 participants