Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.
This repository was 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

Description

@stephenwil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions