Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to clarify legal names #83

Closed
wants to merge 1 commit into from
Closed

Try to clarify legal names #83

wants to merge 1 commit into from

Conversation

jabley
Copy link
Contributor

@jabley jabley commented Dec 22, 2014

The current definition:

The tag's content MUST be a non-whitespace character sequence NOT
containing the current closing delimiter.

That would imply that {{content}} is legal, but {{ content }} is
not legal.

However, later tests state “Superfluous in-tag whitespace should be
ignored.” and include tests for {{ string }}.

This change attempts to make that clearer and consistent everywhere.

Possibly a BNF or similar grammar would be helpful?

The current definition:

> The tag's content MUST be a non-whitespace character sequence NOT
> containing the current closing delimiter.

That would imply that `{{content}}` is legal, but `{{ content }}` is
not legal.

However, later tests state “Superfluous in-tag whitespace should be
ignored.” and include tests for `{{ string }}`.

This change attempts to make that clearer and consistent everywhere.
@groue
Copy link

groue commented Dec 22, 2014

Is it possible to write any formal grammar, when the language has a "change delimiters tag" which has the following templates render the same: {{name}} and {{=<% %>=}}<%name%>?

Since you're in the process of implementing, I recommend you read #67. When the spec falls short, at least you have a few sensible implementations to take inspiration from.

@groue
Copy link

groue commented Dec 22, 2014

(BTW, I'm not a spec maintainer, just a mustache implementor)

@jabley jabley closed this by deleting the head repository Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants