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

Spec fixes #6

Merged
merged 3 commits into from Aug 18, 2014
Merged

Spec fixes #6

merged 3 commits into from Aug 18, 2014

Commits on Aug 13, 2014

  1. Allow whitespace between '=' and delimiter.

    Currently, qt-mustache will not allow any whitespace between the =
    signs and the start/end delimiter in set delimiter tags. It will
    treat such whitespace as being part of the delimiters and yield the
    error "Custom delimiters may not contain '=' or spaces.".
    
    Apparently, even though the specification reads
    
        "The tag's content MUST be any two non-whitespace sequences
         (separated by whitespace) EXCEPT an equals sign ('=') followed
         by the current closing delimiter." [1],
    
    apparently such whitespace should ignored. E.g. tags such as
    
        {{= [ ] =}}
    
    should be allowed [2]. The spec is slightly ambiguos here I think,
    but that is apparently the intention.
    
    This patch changes `readSetDelimiter(..)` to ignore such whitespace.
    As a result the "Pair with Padding" test case in `delimiters.json`
    now passes, since it has such a set delimiter tag. The "Sections"
    test case in the same file have one as well, and would also pass
    now if we only handled standalone tags properly.
    
    [1] https://github.com/mustache/spec/blob/v1.1.2/specs/delimiters.yml#L5-L7
    [2] mustache/spec#29
    estan committed Aug 13, 2014
    Configuration menu
    Copy the full SHA
    02b3b5a View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2014

  1. Allow whitespace between '=' and delimiter.

    Currently, qt-mustache will not allow any whitespace between the =
    signs and the start/end delimiter in set delimiter tags. It will
    treat such whitespace as being part of the delimiters and yield the
    error "Custom delimiters may not contain '=' or spaces.".
    
    Apparently, even though the specification reads
    
        "The tag's content MUST be any two non-whitespace sequences
         (separated by whitespace) EXCEPT an equals sign ('=') followed
         by the current closing delimiter." [1],
    
    apparently such whitespace should ignored. E.g. tags such as
    
        {{= [ ] =}}
    
    should be allowed [2]. The spec is slightly ambiguos here I think,
    but that is apparently the intention.
    
    This patch changes `readSetDelimiter(..)` to ignore such whitespace.
    As a result the "Pair with Padding" test case in `delimiters.json`
    now passes, since it has such a set delimiter tag. The "Sections"
    test case in the same file have one as well, and would also pass
    now if we only handled standalone tags properly.
    
    [1] https://github.com/mustache/spec/blob/v1.1.2/specs/delimiters.yml#L5-L7
    [2] mustache/spec#29
    estan committed Aug 14, 2014
    Configuration menu
    Copy the full SHA
    ecfb14e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e296200 View commit details
    Browse the repository at this point in the history