Skip to content

Regression[3.0.2]: partials not working as intended after upgrading to version 3.0.2 #712

@wol-soft

Description

@wol-soft

Hi,

after upgrading to mustache.js 3.0.2 a component of my application failed to render a template which uses partials.

I copied the affected parts of the application into a JSFiddle (https://jsfiddle.net/z1jq2pu5/13/) to reproduce the error. The current result of the fiddle looks like:
image

With version 3.0.1 it looked like (can be reproduced by simply changing the CDN URL which includes mustache.js into the JSFiddle):
image

My application breaks with a message (which I can't reproduce in the JSFiddle somehow), may be helpful:

Error: Unclosed tag at 21
    at parseTemplate (VM448557 beerplop-game-1.59.3.min.js:17)
    at Writer.parse (VM448557 beerplop-game-1.59.3.min.js:17)
    at Writer.render (VM448557 beerplop-game-1.59.3.min.js:17)
    at subRender (VM448557 beerplop-game-1.59.3.min.js:17)
    at Object.<anonymous> (VM448557 beerplop-game-1.59.3.min.js:2810)
    at Writer.renderSection (VM448557 beerplop-game-1.59.3.min.js:17)
    at Writer.renderTokens (VM448557 beerplop-game-1.59.3.min.js:17)
    at Writer.renderPartial (VM448557 beerplop-game-1.59.3.min.js:17)
    at Writer.renderTokens (VM448557 beerplop-game-1.59.3.min.js:17)
    at Writer.render (VM448557 beerplop-game-1.59.3.min.js:17)

Seems like the tags of the partial aren't parsed correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions