Skip to content
Commits on Jun 8, 2015
  1. @anoxic
Commits on Mar 25, 2015
  1. @anoxic

    Allow whitespace in tags

    anoxic committed
    * This is more consistent with other mustache engines
    * Adds a test for whitespace in tags, which will fail without the
      included updates
    * Trims whitespace from the beginning and end of tags
    * Updates tag patterns to include whitespace in the match
    * Takes the actual whitespace into account when trimming the closing
      tag off the end of a section
Commits on Oct 23, 2013
  1. @weierophinney

    CS fixes

    weierophinney committed
    - trailing whitespace
  2. @weierophinney

    Merge pull request #25 from andytson/heirarchical-view-cache-bug

    weierophinney committed
    Heirarchical templates with same parents use the results of the first render returning for subsequent renderings
  3. @weierophinney

    [#25] Additional tests and a solution

    weierophinney committed
    - Test case provided by @stanlemon - which, on investigation, further
      confirms #25, and also demonstrates an additional use case that fails.
    - Solution is to add a flag to `Mustache::tokenize()` which disables
      caching of tokens and usage of cached tokens during the tokenization
      process. This really only matters for hierarchical views.
Commits on Mar 21, 2013
  1. @andytson
Commits on Jul 31, 2012
  1. @weierophinney

    [#17] Confirmed issue

    weierophinney committed
    - Problem is with nesting children, and defining new placeholders in
  2. @weierophinney

    [#17] Demonstrate nested content

    weierophinney committed
    - First pass test, showing simple example
  3. @weierophinney
  4. @weierophinney

    [#16] Allow resolvers to return content

    weierophinney committed
    - Resolvers now return either a template _or_ an array of tokens
    - Mustache now simply passes the return value of a resolver to
      tokenize(); if tokens are present, they are cached and returned,
      otherwise the template is compiled.
    - Modified internals of Lexer to compile partials after tokenization
Commits on Jul 30, 2012
  1. @weierophinney

    [#11] Resolver integration with Mustache class

    weierophinney committed
    - Modified Resolver to use SplStack internally, allowing a stack of
    - Modified Mustache class to add accessor/mutator for resolver, and to
      proxy to resolver internally for retrieving templates
  2. @weierophinney

    [#11] added resolvers

    weierophinney committed
    - Created ResolverInterface
    - Created DefaultResolver
      - Allows setting suffix
      - Allows setting template path
      - Allows specifiying directory separator
    - Tests for the above
    - TODO: integration in Mustache class
Commits on Jul 16, 2012
  1. @weierophinney

    [#8] allow dot.notation in variable names

    weierophinney committed
    - Allows dot.notation in variable names: {{}}
    - When discovered, looks for a "$view['foo']['bar']" or
      "$view->foo->bar" (or combination thereof) for a replacement.
    - If depth to last segment is not found, returns empty string
Commits on Jul 15, 2012
  1. @weierophinney

    Added additional tests to verify behavior

    weierophinney committed
    - Ensure placeholders are rendered with default content when no
      replacements are provided
    - Ensure mix of placeholders with subsitutions and without are rendered
  2. @weierophinney

    Implemented hierarchical views

    weierophinney committed
    - Consists of two new tokens: TOKEN_PLACEHOLDER and TOKEN_CHILD
    - Placeholders are rendered as unnamed sections
    - If a TOKEN_CHILD is encountered, the named template is parsed. The
      content of the CHILD section is parsed, and then any placeholders it
      defines are used to replace placeholders of the same name in the
      parent template (any other tokens are ignored). Finally, the complete
      set of tokens is used to replace the original TOKEN_CHILD section.
        <!-- super.mustache -->
        <head><title>{{$title}}Default title{{/title}}</title></head>
        <div class="content">
        {{$content}}Default content of the page{{/content}}
        <!-- sub.mustache -->
        {{$title}}Profile of {{username}} | Twitter{{/title}}
        Here is {{username}}'s profile page
Commits on Jul 14, 2012
  1. @weierophinney

    Created Hierarchical pragma

    weierophinney committed
    - Simply a stub for now
    - Unit test showing intended usage (incomplete; this is only a sample,
      based on
Commits on Jul 10, 2012
  1. @weierophinney

    [#5] Fix rendering of subviews from objects

    weierophinney committed
    - If a view is an object, array notation clearly will not work. Added a
      protected getValue($data, $view) method that will more accurately
      locate a subview, if any, in the view.
Commits on Mar 14, 2012
  1. @andytson @weierophinney

    Fix potential security vector in emptiness check

    andytson committed with weierophinney
    - Fixes a similar security vector to those fixed in previous commits,
      instead caused by scalar strings used in sections, typically used
      to check for emptiness.
      - Now validates the callback to determine if it is valid; if not,
        processes it as a boolean check
Commits on Oct 5, 2011
  1. @weierophinney

    Fix another potential security vector

    Andy Thompson committed with weierophinney
Commits on Sep 22, 2011
  1. @weierophinney

    Fix potential security vector

    weierophinney committed
    - Fixes a potential security vector whereby if the value of a view model
      key references a PHP function, that function is called.
      - Now validates the callback to determine if it is a static method
        call or namespaced function call; if not, simply returns the value.
Commits on Apr 3, 2011
  1. @weierophinney
Commits on Sep 14, 2010
  1. @weierophinney

    SUB-VIEWS pragma implementation

    weierophinney committed
    - Added ability to render "sub views", implementing a two-step view pattern.
Commits on Sep 2, 2010
  1. @weierophinney

    API documentation

    weierophinney committed
    - Created API file and class level docblocks for all classes
    - Minor updates to the phpunit.xml file (to exclude mustache template files from
      code coverage)
    - Updated README.txt to demonstrate and explain autoloading
Commits on Sep 1, 2010
  1. @weierophinney
  2. @weierophinney

    Better whitespace handling

    weierophinney committed
    - Strips excessive newlines from content tokens surrounding delim-set, comment,
      and section tokens.
    - Still have too much indentation; trying to resolve
  3. @weierophinney

    Fix iteration tests

    weierophinney committed
    - By default, iteration requires each "item" to be an object/hash; updated
      template and view objects to ensure appropriate tests
  4. @weierophinney

    Recursive partial handling

    weierophinney committed
    - Properly handles recursive partials
  5. @weierophinney

    Tested and corrected pragma handling

    weierophinney committed
    - Pragmas are section specific
    - Pragmas do not extend to partials
  6. @weierophinney

    Tested and corrected setting delimiters

    weierophinney committed
    - Allows specifying alternate delimiters
    - Alternate delimiters set in section only apply to that section
    - Alternate delimiters apply to child sections
    - Alternate delimiters do not carry to partials
Commits on Aug 31, 2010
  1. @weierophinney

    Tested comments

    weierophinney committed
    - Tested (and fixed) comment lexing and (lack of) rendering
Commits on Aug 30, 2010
  1. @weierophinney
  2. @weierophinney
  3. @weierophinney

    Fixed pragma tests

    weierophinney committed
    - Typo in method call.
    - Add implicit iterator pragma to renderer, prior to rendering.
Commits on Aug 29, 2010
  1. @weierophinney

    Pragma handling

    weierophinney committed
    - Added lexer support for pragmas
    - Added renderer support for pragmas
      - Add pragma to a local list when found
      - On each iteration through tokens, pass to handlePragmas() first; if
        non-empty value is returned, append and continue.
  2. @weierophinney

    Higher order sections

    weierophinney committed
    - Created logic for handling higher-order sections
Something went wrong with that request. Please try again.