Rendering wrong partial when it has similar names
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.
+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. :/
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.