From b7a1a8c991f8b1f105e71939ed03cbba23558d4a Mon Sep 17 00:00:00 2001 From: egaga Date: Wed, 29 Jan 2014 13:51:02 +0200 Subject: [PATCH] =?UTF-8?q?reference=20`this=C2=B4=20instead=20of=20`self?= =?UTF-8?q?=C2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fa12a5..12d51fc 100644 --- a/README.md +++ b/README.md @@ -312,7 +312,7 @@ times. One will often make use of these special variables in an inverted section, as follows: - String tmpl = "{{#things}}{{^-first}}, {{/-first}}{{self}}{{/things}}"; + String tmpl = "{{#things}}{{^-first}}, {{/-first}}{{this}}{{/things}}"; Mustache.compiler().compile(tmpl).execute(new Object() { List things = Arrays.asList("one", "two", "three"); }); @@ -329,7 +329,7 @@ section, 2 for the second, 3 for the third and so forth. It contains 0 at all other times. Note that it also contains 0 for a section that is populated by a singleton value rather than a list. - String tmpl = "My favorite things:\n{{#things}}{{-index}}. {{self}}\n{{/things}}"; + String tmpl = "My favorite things:\n{{#things}}{{-index}}. {{this}}\n{{/things}}"; Mustache.compiler().compile(tmpl).execute(new Object() { List things = Arrays.asList("Peanut butter", "Pen spinning", "Handstands"); });