annotate Resources/CMake/PlustacheConfiguration.patch @ 1144:fef79a477e09

note
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Sep 2014 10:26:32 +0200
parents d8f5de5b9517
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
825
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 diff -r -u plustache-0.3.0.orig/include/template.hpp plustache-0.3.0/include/template.hpp
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 --- plustache-0.3.0.orig/include/template.hpp 2014-01-29 13:26:52.000000000 +0100
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 +++ plustache-0.3.0/include/template.hpp 2014-05-28 17:51:51.623305914 +0200
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 @@ -21,7 +21,7 @@
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 public:
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 template_t ();
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 template_t (std::string& tmpl_path);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 - ~template_t ();
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 + virtual ~template_t ();
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 std::string render(const std::string& tmplate, const Context& ctx);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 std::string render(const std::string& tmplate, const ObjectType& ctx);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 @@ -42,11 +42,13 @@
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 std::string render_sections(const std::string& tmplate,
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 const Context& ctx);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 std::string html_escape(const std::string& s);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 - std::string get_partial(const std::string& partial) const;
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 void change_delimiter(const std::string& opentag,
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 const std::string& closetag);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 void compile_data();
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 - std::string get_template(const std::string& tmpl);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 +
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 + protected:
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 + virtual std::string get_partial(const std::string& partial) const;
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 + virtual std::string get_template(const std::string& tmpl);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 };
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 } // namespace Plustache
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #endif
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 Only in plustache-0.3.0/include: template.hpp~
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 diff -r -u plustache-0.3.0.orig/src/template.cpp plustache-0.3.0/src/template.cpp
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 --- plustache-0.3.0.orig/src/template.cpp 2014-01-29 13:26:52.000000000 +0100
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 +++ plustache-0.3.0/src/template.cpp 2014-05-28 17:51:32.599306393 +0200
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 @@ -126,7 +126,7 @@
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 // found a partial
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 else if (modifier == ">")
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 {
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 - std::string partial = template_t::get_partial(key);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 + std::string partial = get_partial(key);
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 repl.assign(template_t::render(partial, ctx));
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 }
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 // normal tag
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 Only in plustache-0.3.0/src: template.cpp~