From e80aab2a670ca871137b9aee5caaffab68c7edd1 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 8 Jan 2014 11:01:56 -0800 Subject: [PATCH] Fixed insufficient indentation. --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4cc8c4e..729c710 100644 --- a/README.md +++ b/README.md @@ -246,17 +246,17 @@ User-defined object formatting By default, JMustache uses `String.valueOf` to convert objects to strings when rendering a template. You can customize this formatting by implementing the `Mustache.Formatter` interface: - Mustache.compiler().withFormatter(new Mustache.Formatter() { - public String format (Object value) { - if (value instanceof Date) return _fmt.format((Date)value); - else return String.valueOf(value); - } - protected DateFormat _fmt = new SimpleDateFormat("yyyy/MM/dd"); - }).compile("{{msg}}: {{today}}").execute(new Object() { - String msg = Date: "; - Date today = new Date(); - }) - // result: Date: 2013/01/08 + Mustache.compiler().withFormatter(new Mustache.Formatter() { + public String format (Object value) { + if (value instanceof Date) return _fmt.format((Date)value); + else return String.valueOf(value); + } + protected DateFormat _fmt = new SimpleDateFormat("yyyy/MM/dd"); + }).compile("{{msg}}: {{today}}").execute(new Object() { + String msg = Date: "; + Date today = new Date(); + }) + // result: Date: 2013/01/08 User-defined escaping rules ---------------------------