Search code examples
eclipsemustachezend-studiomustache.php

Mustache partial notation in Eclipse / Zend Studio 10 throws invalid character warning


I'm running Zend Studio 10 with code using mustache templating. Mustache notation for including a partial is (from https://github.com/bobthecow/mustache.php/wiki/Mustache-Tags#partials):

{{> my/partial}}

This triggers a syntax warning (a little yellow triangle with exclamation point).

Invalid character used in text string 

Has any else experienced this in Zend Studio with any templating languages? How did you go about adding an exception to code checking?


Solution

  • As far as I can tell:

    1. The html Validator is triggering the error
    2. There is no mustache validator for Eclipse
    3. There isn't an easy way via Eclipse preferences to add a rule like allow/ignore {{> to a validator--namely the HTML validator

    My current solution is to disable the HTML validator on mustache files by adding an exclusion group to the validation settings to ignore anything .mustache.

    This sucks however since I'd really like to validate 99% of the code that's non-mustache HTML in these files with the build in validator :(