Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

More than one space in partial name caused partial not be found in the known partials list #7

Open
stephenwil opened this issue Oct 11, 2016 · 0 comments

Comments

@stephenwil
Copy link

I am using Pattern Lab Node v1.0.0 on Mac, using the gulp configuration.

Expected Behavior

{{> some-partial-with-more-than-one-space-in-the-reference }

Actual Behavior

Partial is not found, and therefore in the node version of patternlab, the template errors.

Steps to Reproduce

See

L103 in engine_mustache.js
var foundPatternPartial = partialString.replace("{{> ", "").replace(" }}", "").replace("{{>", "").replace("}}", "");

It assumes there is only one space before the ending curly brackets.
Suggestion: Should use regex to remove to curly and angle brackets.

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

No branches or pull requests

1 participant