diffed 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ <table class="coloured-diff">
2
+ <tr class="section"><td>...</td><td>...</td><td><pre>@@ -35,9 +35,10 @@ private</pre></td></tr>
3
+ <tr class="both"><td>35</td><td>35</td><td><pre> # Parse the input searching for lines. Initialize Line object for every line.</pre></td></tr>
4
+ <tr class="both"><td>36</td><td>36</td><td><pre> # Return an array of Line objects.</pre></td></tr>
5
+ <tr class="both"><td>37</td><td>37</td><td><pre> def find_lines!</pre></td></tr>
6
+ <tr class="left"><td>38</td><td>.</td><td><pre>- returning(@lines = []) do</pre></td></tr>
7
+ <tr class="left"><td>39</td><td>.</td><td><pre>- input.split(/\r?\n/).each_with_index do |line_str, idx|</pre></td></tr>
8
+ <tr class="left"><td>40</td><td>.</td><td><pre>- line = PrettyDiff::Line.new(diff, line_str, :number =&gt; idx)</pre></td></tr>
9
+ <tr class="right"><td>.</td><td>38</td><td><pre>+ @lines = []</pre></td></tr>
10
+ <tr class="right"><td>.</td><td>39</td><td><pre>+ @lines.tap do</pre></td></tr>
11
+ <tr class="right highlight"><td>.</td><td>40</td><td><pre>+ input.split(/\r?\n/).each do |line_str|</pre></td></tr>
12
+ <tr class="right"><td>.</td><td>41</td><td><pre>+ line = PrettyDiff::Line.new(diff, line_str)</pre></td></tr>
13
+ <tr class="both highlight"><td>41</td><td>42</td><td><pre> next if line.ignore?</pre></td></tr>
14
+ <tr class="both"><td>42</td><td>43</td><td><pre> @lines &lt;&lt; line</pre></td></tr>
15
+ <tr class="both"><td>43</td><td>44</td><td><pre> line_numbers.act_on_line(line)</pre></td></tr>
16
+ </table>
@@ -0,0 +1,14 @@
1
+ @@ -35,9 +35,10 @@ private
2
+ # Parse the input searching for lines. Initialize Line object for every line.
3
+ # Return an array of Line objects.
4
+ def find_lines!
5
+ - returning(@lines = []) do
6
+ - input.split(/\r?\n/).each_with_index do |line_str, idx|
7
+ - line = PrettyDiff::Line.new(diff, line_str, :number => idx)
8
+ + @lines = []
9
+ + @lines.tap do
10
+ + input.split(/\r?\n/).each do |line_str|
11
+ + line = PrettyDiff::Line.new(diff, line_str)
12
+ next if line.ignore?
13
+ @lines << line
14
+ line_numbers.act_on_line(line)
@@ -0,0 +1,72 @@
1
+ <table cellpadding="5" style="border-collapse: collapse; border: 1px solid #CCC; font-family: Consolas, courier, monospace; font-size: 11px; color: #888">
2
+ <tr style="background-color: #F0F0FF" >
3
+ <td style="border-left: 1px solid #CCC">...</td>
4
+ <td style="border-left: 1px solid #CCC">...</td>
5
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -35,9 +35,10 @@ private</pre></td>
6
+ </tr>
7
+ <tr>
8
+ <td style="border-left: 1px solid #CCC">35</td>
9
+ <td style="border-left: 1px solid #CCC">35</td>
10
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> # Parse the input searching for lines. Initialize Line object for every line.</pre></td>
11
+ </tr>
12
+ <tr>
13
+ <td style="border-left: 1px solid #CCC">36</td>
14
+ <td style="border-left: 1px solid #CCC">36</td>
15
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> # Return an array of Line objects.</pre></td>
16
+ </tr>
17
+ <tr>
18
+ <td style="border-left: 1px solid #CCC">37</td>
19
+ <td style="border-left: 1px solid #CCC">37</td>
20
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> def find_lines!</pre></td>
21
+ </tr>
22
+ <tr style="background-color: #FDD" >
23
+ <td style="border-left: 1px solid #CCC">38</td>
24
+ <td style="border-left: 1px solid #CCC">.</td>
25
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- returning(@lines = []) do</pre></td>
26
+ </tr>
27
+ <tr style="background-color: #FDD" >
28
+ <td style="border-left: 1px solid #CCC">39</td>
29
+ <td style="border-left: 1px solid #CCC">.</td>
30
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- input.split(/\r?\n/).each_with_index do |line_str, idx|</pre></td>
31
+ </tr>
32
+ <tr style="background-color: #FDD" >
33
+ <td style="border-left: 1px solid #CCC">40</td>
34
+ <td style="border-left: 1px solid #CCC">.</td>
35
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- line = PrettyDiff::Line.new(diff, line_str, :number =&gt; idx)</pre></td>
36
+ </tr>
37
+ <tr style="background-color: #DFD" >
38
+ <td style="border-left: 1px solid #CCC">.</td>
39
+ <td style="border-left: 1px solid #CCC">38</td>
40
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ @lines = []</pre></td>
41
+ </tr>
42
+ <tr style="background-color: #DFD" >
43
+ <td style="border-left: 1px solid #CCC">.</td>
44
+ <td style="border-left: 1px solid #CCC">39</td>
45
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ @lines.tap do</pre></td>
46
+ </tr>
47
+ <tr style="background-color: #DFD; font-weight: bold" >
48
+ <td style="border-left: 1px solid #CCC">.</td>
49
+ <td style="border-left: 1px solid #CCC">40</td>
50
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ input.split(/\r?\n/).each do |line_str|</pre></td>
51
+ </tr>
52
+ <tr style="background-color: #DFD" >
53
+ <td style="border-left: 1px solid #CCC">.</td>
54
+ <td style="border-left: 1px solid #CCC">41</td>
55
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ line = PrettyDiff::Line.new(diff, line_str)</pre></td>
56
+ </tr>
57
+ <tr style="font-weight: bold" >
58
+ <td style="border-left: 1px solid #CCC">41</td>
59
+ <td style="border-left: 1px solid #CCC">42</td>
60
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> next if line.ignore?</pre></td>
61
+ </tr>
62
+ <tr>
63
+ <td style="border-left: 1px solid #CCC">42</td>
64
+ <td style="border-left: 1px solid #CCC">43</td>
65
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> @lines &lt;&lt; line</pre></td>
66
+ </tr>
67
+ <tr>
68
+ <td style="border-left: 1px solid #CCC">43</td>
69
+ <td style="border-left: 1px solid #CCC">44</td>
70
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> line_numbers.act_on_line(line)</pre></td>
71
+ </tr>
72
+ </table>
@@ -1,147 +1,727 @@
1
- <table cellpadding="5" style="border-collapse: collapse; border: 1px solid #CCC; font-family: Consolas, courier, monospace; font-size: 13px; color: #888">
2
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -23,7 +23,6 @@ import static org.apache.commons.lang3.Validate.isTrue;</pre></td></tr>
3
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import static org.apache.commons.lang3.Validate.notNull;</pre></td></tr>
4
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
5
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.io.IOException;</pre></td></tr>
6
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>-import java.io.InputStream;</pre></td></tr>
7
- <tr><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.io.Writer;</pre></td></tr>
8
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.lang.reflect.InvocationHandler;</pre></td></tr>
9
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.lang.reflect.Method;</pre></td></tr>
10
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -75,7 +74,7 @@ abstract class BaseTemplate implements Template {</pre></td></tr>
11
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td></tr>
12
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * A Handlebars.js lock.</pre></td></tr>
13
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td></tr>
14
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static final Object JS_LOCK = new Object();</pre></td></tr>
15
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private final Object jsLock = new Object();</pre></td></tr>
16
- <tr><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
17
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td></tr>
18
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * A pre-compiled JavaScript function.</pre></td></tr>
19
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -85,12 +84,12 @@ abstract class BaseTemplate implements Template {</pre></td></tr>
20
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td></tr>
21
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * Handlerbars.js version.</pre></td></tr>
22
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td></tr>
23
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static final String HBS_FILE = &quot;/handlebars-1.0.rc.3.js&quot;;</pre></td></tr>
24
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private static final String HBS_FILE = &quot;/handlebars-1.0.0.js&quot;;</pre></td></tr>
25
- <tr><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
26
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td></tr>
27
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * A shared scope with Handlebars.js objects.</pre></td></tr>
28
- <tr><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td></tr>
29
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static ScriptableObject sharedScope;</pre></td></tr>
30
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private ScriptableObject sharedScope;</pre></td></tr>
31
- <tr><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
32
- <tr><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td></tr>
33
- <tr><td style="border-left: 1px solid #CCC">12</td><td style="border-left: 1px solid #CCC">12</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * {@inheritDoc}</pre></td></tr>
34
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -287,7 +286,7 @@ abstract class BaseTemplate implements Template {</pre></td></tr>
35
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
36
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> @Override</pre></td></tr>
37
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> public String toJavaScript() throws IOException {</pre></td></tr>
38
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- synchronized (JS_LOCK) {</pre></td></tr>
39
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ synchronized (jsLock) {</pre></td></tr>
40
- <tr><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> if (javaScript == null) {</pre></td></tr>
41
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> org.mozilla.javascript.Context ctx = null;</pre></td></tr>
42
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> try {</pre></td></tr>
43
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -330,7 +329,7 @@ abstract class BaseTemplate implements Template {</pre></td></tr>
44
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @param ctx A rhino context.</pre></td></tr>
45
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @return A new scope where handlebars.js is present.</pre></td></tr>
46
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td></tr>
47
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static Scriptable newScope(final org.mozilla.javascript.Context ctx) {</pre></td></tr>
48
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private Scriptable newScope(final org.mozilla.javascript.Context ctx) {</pre></td></tr>
49
- <tr><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> Scriptable sharedScope = sharedScope(ctx);</pre></td></tr>
50
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> Scriptable scope = ctx.newObject(sharedScope);</pre></td></tr>
51
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> scope.setParentScope(null);</pre></td></tr>
52
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -345,12 +344,10 @@ abstract class BaseTemplate implements Template {</pre></td></tr>
53
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @param ctx A rhino context.</pre></td></tr>
54
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @return A handlebars.js scope. Shared between executions.</pre></td></tr>
55
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td></tr>
56
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static Scriptable</pre></td></tr>
57
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- sharedScope(final org.mozilla.javascript.Context ctx) {</pre></td></tr>
58
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private Scriptable sharedScope(final org.mozilla.javascript.Context ctx) {</pre></td></tr>
59
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> if (sharedScope == null) {</pre></td></tr>
60
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> sharedScope = ctx.initStandardObjects();</pre></td></tr>
61
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- ctx.evaluateString(sharedScope, handlebarsScript(HBS_FILE), HBS_FILE, 1,</pre></td></tr>
62
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- null);</pre></td></tr>
63
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ ctx.evaluateString(sharedScope, handlebarsScript(HBS_FILE), HBS_FILE, 1, null);</pre></td></tr>
64
- <tr><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
65
- <tr><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> return sharedScope;</pre></td></tr>
66
- <tr><td style="border-left: 1px solid #CCC">12</td><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
67
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -361,25 +358,11 @@ abstract class BaseTemplate implements Template {</pre></td></tr>
68
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @param location The handlebars.js location.</pre></td></tr>
69
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @return The resource content.</pre></td></tr>
70
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td></tr>
71
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static String handlebarsScript(final String location) {</pre></td></tr>
72
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- InputStream in = BaseTemplate.class.getResourceAsStream(location);</pre></td></tr>
73
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- notNull(in, &quot;Handlebars.js script not found at &quot; + location);</pre></td></tr>
74
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private String handlebarsScript(final String location) {</pre></td></tr>
75
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> try {</pre></td></tr>
76
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- int ch = in.read();</pre></td></tr>
77
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- StringBuilder script = new StringBuilder();</pre></td></tr>
78
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- while (ch != -1) {</pre></td></tr>
79
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- script.append((char) ch);</pre></td></tr>
80
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">12</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- ch = in.read();</pre></td></tr>
81
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">13</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td></tr>
82
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">14</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- return script.toString();</pre></td></tr>
83
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ return Files.read(location);</pre></td></tr>
84
- <tr><td style="border-left: 1px solid #CCC">15</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> } catch (IOException ex) {</pre></td></tr>
85
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">16</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- throw new IllegalStateException(&quot;Unable to read file &quot; + location);</pre></td></tr>
86
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">17</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- } finally {</pre></td></tr>
87
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">18</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- try {</pre></td></tr>
88
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">19</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- in.close();</pre></td></tr>
89
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">20</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- } catch (IOException ex) {</pre></td></tr>
90
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">21</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- throw new IllegalStateException(&quot;Unable to close file &quot; + location);</pre></td></tr>
91
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">22</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td></tr>
92
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ throw new IllegalArgumentException(&quot;Unable to read file: &quot; + location, ex);</pre></td></tr>
93
- <tr><td style="border-left: 1px solid #CCC">23</td><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
94
- <tr><td style="border-left: 1px solid #CCC">24</td><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
95
- <tr><td style="border-left: 1px solid #CCC">25</td><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
96
- <tr style="background-color: #F0F0FF"><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC">...</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -2,32 +2,32 @@ package com.github.jknack.handlebars;</pre></td></tr>
97
- <tr><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC">1</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
98
- <tr><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC">2</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import static org.junit.Assert.assertEquals;</pre></td></tr>
99
- <tr><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC">3</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
100
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>-import org.junit.Test;</pre></td></tr>
101
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>-</pre></td></tr>
102
- <tr><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC">4</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.io.IOException;</pre></td></tr>
103
- <tr><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC">5</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
104
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">6</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+import org.junit.Test;</pre></td></tr>
105
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">7</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+</pre></td></tr>
106
- <tr><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC">8</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> public class ToStringTest {</pre></td></tr>
107
- <tr><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC">9</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
108
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public static class UnsafeString {</pre></td></tr>
109
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- String underlying;</pre></td></tr>
110
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">10</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public static class UnsafeString {</pre></td></tr>
111
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">11</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ String underlying;</pre></td></tr>
112
- <tr><td style="border-left: 1px solid #CCC">12</td><td style="border-left: 1px solid #CCC">12</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
113
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">13</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public UnsafeString(String underlying) {</pre></td></tr>
114
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">14</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- this.underlying = underlying;</pre></td></tr>
115
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">15</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td></tr>
116
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">13</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public UnsafeString(final String underlying) {</pre></td></tr>
117
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">14</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ this.underlying = underlying;</pre></td></tr>
118
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">15</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ }</pre></td></tr>
119
- <tr><td style="border-left: 1px solid #CCC">16</td><td style="border-left: 1px solid #CCC">16</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
120
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">17</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- @Override</pre></td></tr>
121
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">18</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public String toString() {</pre></td></tr>
122
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">19</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- return &quot;&lt;h1&gt;&quot; + underlying + &quot;&lt;/h1&gt;&quot;;</pre></td></tr>
123
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">20</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td></tr>
124
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">17</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ @Override</pre></td></tr>
125
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">18</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public String toString() {</pre></td></tr>
126
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">19</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ return &quot;&lt;h1&gt;&quot; + underlying + &quot;&lt;/h1&gt;&quot;;</pre></td></tr>
127
- <tr><td style="border-left: 1px solid #CCC">21</td><td style="border-left: 1px solid #CCC">20</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
128
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">21</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ }</pre></td></tr>
129
- <tr><td style="border-left: 1px solid #CCC">22</td><td style="border-left: 1px solid #CCC">22</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
130
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">23</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- @Test</pre></td></tr>
131
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">24</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public void unsafeString() throws IOException {</pre></td></tr>
132
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">25</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- Handlebars handlebars = new Handlebars();</pre></td></tr>
133
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">26</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- Template template = handlebars.compileInline(&quot;{{this}}&quot;);</pre></td></tr>
134
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">23</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ @Test</pre></td></tr>
135
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">24</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public void unsafeString() throws IOException {</pre></td></tr>
136
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">25</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ Handlebars handlebars = new Handlebars();</pre></td></tr>
137
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">26</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ Template template = handlebars.compileInline(&quot;{{this}}&quot;);</pre></td></tr>
138
- <tr><td style="border-left: 1px solid #CCC">27</td><td style="border-left: 1px solid #CCC">27</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
139
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">28</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- String result = template.apply(new UnsafeString(&quot;Hello&quot;));</pre></td></tr>
140
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">28</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ String result = template.apply(new UnsafeString(&quot;Hello&quot;));</pre></td></tr>
141
- <tr><td style="border-left: 1px solid #CCC">29</td><td style="border-left: 1px solid #CCC">29</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td></tr>
142
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">30</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- assertEquals(&quot;&amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;&quot;, result);</pre></td></tr>
143
- <tr style="background-color: #FDD"><td style="border-left: 1px solid #CCC">31</td><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td></tr>
144
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">30</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ assertEquals(&quot;&amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;&quot;, result);</pre></td></tr>
145
- <tr style="background-color: #DFD"><td style="border-left: 1px solid #CCC">.</td><td style="border-left: 1px solid #CCC">31</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ }</pre></td></tr>
146
- <tr><td style="border-left: 1px solid #CCC">32</td><td style="border-left: 1px solid #CCC">32</td><td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td></tr>
147
- </table>
1
+ <table cellpadding="5" style="border-collapse: collapse; border: 1px solid #CCC; font-family: Consolas, courier, monospace; font-size: 11px; color: #888">
2
+ <tr style="background-color: #F0F0FF" >
3
+ <td style="border-left: 1px solid #CCC">...</td>
4
+ <td style="border-left: 1px solid #CCC">...</td>
5
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -23,7 +23,6 @@ import static org.apache.commons.lang3.Validate.isTrue;</pre></td>
6
+ </tr>
7
+ <tr>
8
+ <td style="border-left: 1px solid #CCC">23</td>
9
+ <td style="border-left: 1px solid #CCC">23</td>
10
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import static org.apache.commons.lang3.Validate.notNull;</pre></td>
11
+ </tr>
12
+ <tr>
13
+ <td style="border-left: 1px solid #CCC">24</td>
14
+ <td style="border-left: 1px solid #CCC">24</td>
15
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
16
+ </tr>
17
+ <tr>
18
+ <td style="border-left: 1px solid #CCC">25</td>
19
+ <td style="border-left: 1px solid #CCC">25</td>
20
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.io.IOException;</pre></td>
21
+ </tr>
22
+ <tr style="background-color: #FDD" >
23
+ <td style="border-left: 1px solid #CCC">26</td>
24
+ <td style="border-left: 1px solid #CCC">.</td>
25
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>-import java.io.InputStream;</pre></td>
26
+ </tr>
27
+ <tr>
28
+ <td style="border-left: 1px solid #CCC">27</td>
29
+ <td style="border-left: 1px solid #CCC">26</td>
30
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.io.Writer;</pre></td>
31
+ </tr>
32
+ <tr>
33
+ <td style="border-left: 1px solid #CCC">28</td>
34
+ <td style="border-left: 1px solid #CCC">27</td>
35
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.lang.reflect.InvocationHandler;</pre></td>
36
+ </tr>
37
+ <tr>
38
+ <td style="border-left: 1px solid #CCC">29</td>
39
+ <td style="border-left: 1px solid #CCC">28</td>
40
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.lang.reflect.Method;</pre></td>
41
+ </tr>
42
+ <tr style="background-color: #F0F0FF" >
43
+ <td style="border-left: 1px solid #CCC">...</td>
44
+ <td style="border-left: 1px solid #CCC">...</td>
45
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -75,7 +74,7 @@ abstract class BaseTemplate implements Template {</pre></td>
46
+ </tr>
47
+ <tr>
48
+ <td style="border-left: 1px solid #CCC">75</td>
49
+ <td style="border-left: 1px solid #CCC">74</td>
50
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td>
51
+ </tr>
52
+ <tr>
53
+ <td style="border-left: 1px solid #CCC">76</td>
54
+ <td style="border-left: 1px solid #CCC">75</td>
55
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * A Handlebars.js lock.</pre></td>
56
+ </tr>
57
+ <tr>
58
+ <td style="border-left: 1px solid #CCC">77</td>
59
+ <td style="border-left: 1px solid #CCC">76</td>
60
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td>
61
+ </tr>
62
+ <tr style="background-color: #FDD" >
63
+ <td style="border-left: 1px solid #CCC">78</td>
64
+ <td style="border-left: 1px solid #CCC">.</td>
65
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static final Object JS_LOCK = new Object();</pre></td>
66
+ </tr>
67
+ <tr style="background-color: #DFD" >
68
+ <td style="border-left: 1px solid #CCC">.</td>
69
+ <td style="border-left: 1px solid #CCC">77</td>
70
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private final Object jsLock = new Object();</pre></td>
71
+ </tr>
72
+ <tr>
73
+ <td style="border-left: 1px solid #CCC">79</td>
74
+ <td style="border-left: 1px solid #CCC">78</td>
75
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
76
+ </tr>
77
+ <tr>
78
+ <td style="border-left: 1px solid #CCC">80</td>
79
+ <td style="border-left: 1px solid #CCC">79</td>
80
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td>
81
+ </tr>
82
+ <tr>
83
+ <td style="border-left: 1px solid #CCC">81</td>
84
+ <td style="border-left: 1px solid #CCC">80</td>
85
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * A pre-compiled JavaScript function.</pre></td>
86
+ </tr>
87
+ <tr style="background-color: #F0F0FF" >
88
+ <td style="border-left: 1px solid #CCC">...</td>
89
+ <td style="border-left: 1px solid #CCC">...</td>
90
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -85,12 +84,12 @@ abstract class BaseTemplate implements Template {</pre></td>
91
+ </tr>
92
+ <tr>
93
+ <td style="border-left: 1px solid #CCC">85</td>
94
+ <td style="border-left: 1px solid #CCC">84</td>
95
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td>
96
+ </tr>
97
+ <tr>
98
+ <td style="border-left: 1px solid #CCC">86</td>
99
+ <td style="border-left: 1px solid #CCC">85</td>
100
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * Handlerbars.js version.</pre></td>
101
+ </tr>
102
+ <tr>
103
+ <td style="border-left: 1px solid #CCC">87</td>
104
+ <td style="border-left: 1px solid #CCC">86</td>
105
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td>
106
+ </tr>
107
+ <tr style="background-color: #FDD" >
108
+ <td style="border-left: 1px solid #CCC">88</td>
109
+ <td style="border-left: 1px solid #CCC">.</td>
110
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static final String HBS_FILE = &quot;/handlebars-1.0.rc.3.js&quot;;</pre></td>
111
+ </tr>
112
+ <tr style="background-color: #DFD" >
113
+ <td style="border-left: 1px solid #CCC">.</td>
114
+ <td style="border-left: 1px solid #CCC">87</td>
115
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private static final String HBS_FILE = &quot;/handlebars-1.0.0.js&quot;;</pre></td>
116
+ </tr>
117
+ <tr>
118
+ <td style="border-left: 1px solid #CCC">89</td>
119
+ <td style="border-left: 1px solid #CCC">88</td>
120
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
121
+ </tr>
122
+ <tr>
123
+ <td style="border-left: 1px solid #CCC">90</td>
124
+ <td style="border-left: 1px solid #CCC">89</td>
125
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td>
126
+ </tr>
127
+ <tr>
128
+ <td style="border-left: 1px solid #CCC">91</td>
129
+ <td style="border-left: 1px solid #CCC">90</td>
130
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * A shared scope with Handlebars.js objects.</pre></td>
131
+ </tr>
132
+ <tr>
133
+ <td style="border-left: 1px solid #CCC">92</td>
134
+ <td style="border-left: 1px solid #CCC">91</td>
135
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td>
136
+ </tr>
137
+ <tr style="background-color: #FDD" >
138
+ <td style="border-left: 1px solid #CCC">93</td>
139
+ <td style="border-left: 1px solid #CCC">.</td>
140
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static ScriptableObject sharedScope;</pre></td>
141
+ </tr>
142
+ <tr style="background-color: #DFD" >
143
+ <td style="border-left: 1px solid #CCC">.</td>
144
+ <td style="border-left: 1px solid #CCC">92</td>
145
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private ScriptableObject sharedScope;</pre></td>
146
+ </tr>
147
+ <tr>
148
+ <td style="border-left: 1px solid #CCC">94</td>
149
+ <td style="border-left: 1px solid #CCC">93</td>
150
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
151
+ </tr>
152
+ <tr>
153
+ <td style="border-left: 1px solid #CCC">95</td>
154
+ <td style="border-left: 1px solid #CCC">94</td>
155
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> /**</pre></td>
156
+ </tr>
157
+ <tr>
158
+ <td style="border-left: 1px solid #CCC">96</td>
159
+ <td style="border-left: 1px solid #CCC">95</td>
160
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * {@inheritDoc}</pre></td>
161
+ </tr>
162
+ <tr style="background-color: #F0F0FF" >
163
+ <td style="border-left: 1px solid #CCC">...</td>
164
+ <td style="border-left: 1px solid #CCC">...</td>
165
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -287,7 +286,7 @@ abstract class BaseTemplate implements Template {</pre></td>
166
+ </tr>
167
+ <tr>
168
+ <td style="border-left: 1px solid #CCC">287</td>
169
+ <td style="border-left: 1px solid #CCC">286</td>
170
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
171
+ </tr>
172
+ <tr>
173
+ <td style="border-left: 1px solid #CCC">288</td>
174
+ <td style="border-left: 1px solid #CCC">287</td>
175
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> @Override</pre></td>
176
+ </tr>
177
+ <tr>
178
+ <td style="border-left: 1px solid #CCC">289</td>
179
+ <td style="border-left: 1px solid #CCC">288</td>
180
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> public String toJavaScript() throws IOException {</pre></td>
181
+ </tr>
182
+ <tr style="background-color: #FDD" >
183
+ <td style="border-left: 1px solid #CCC">290</td>
184
+ <td style="border-left: 1px solid #CCC">.</td>
185
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- synchronized (JS_LOCK) {</pre></td>
186
+ </tr>
187
+ <tr style="background-color: #DFD" >
188
+ <td style="border-left: 1px solid #CCC">.</td>
189
+ <td style="border-left: 1px solid #CCC">289</td>
190
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ synchronized (jsLock) {</pre></td>
191
+ </tr>
192
+ <tr>
193
+ <td style="border-left: 1px solid #CCC">291</td>
194
+ <td style="border-left: 1px solid #CCC">290</td>
195
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> if (javaScript == null) {</pre></td>
196
+ </tr>
197
+ <tr>
198
+ <td style="border-left: 1px solid #CCC">292</td>
199
+ <td style="border-left: 1px solid #CCC">291</td>
200
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> org.mozilla.javascript.Context ctx = null;</pre></td>
201
+ </tr>
202
+ <tr>
203
+ <td style="border-left: 1px solid #CCC">293</td>
204
+ <td style="border-left: 1px solid #CCC">292</td>
205
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> try {</pre></td>
206
+ </tr>
207
+ <tr style="background-color: #F0F0FF" >
208
+ <td style="border-left: 1px solid #CCC">...</td>
209
+ <td style="border-left: 1px solid #CCC">...</td>
210
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -330,7 +329,7 @@ abstract class BaseTemplate implements Template {</pre></td>
211
+ </tr>
212
+ <tr>
213
+ <td style="border-left: 1px solid #CCC">330</td>
214
+ <td style="border-left: 1px solid #CCC">329</td>
215
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @param ctx A rhino context.</pre></td>
216
+ </tr>
217
+ <tr>
218
+ <td style="border-left: 1px solid #CCC">331</td>
219
+ <td style="border-left: 1px solid #CCC">330</td>
220
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @return A new scope where handlebars.js is present.</pre></td>
221
+ </tr>
222
+ <tr>
223
+ <td style="border-left: 1px solid #CCC">332</td>
224
+ <td style="border-left: 1px solid #CCC">331</td>
225
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td>
226
+ </tr>
227
+ <tr style="background-color: #FDD" >
228
+ <td style="border-left: 1px solid #CCC">333</td>
229
+ <td style="border-left: 1px solid #CCC">.</td>
230
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static Scriptable newScope(final org.mozilla.javascript.Context ctx) {</pre></td>
231
+ </tr>
232
+ <tr style="background-color: #DFD" >
233
+ <td style="border-left: 1px solid #CCC">.</td>
234
+ <td style="border-left: 1px solid #CCC">332</td>
235
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private Scriptable newScope(final org.mozilla.javascript.Context ctx) {</pre></td>
236
+ </tr>
237
+ <tr>
238
+ <td style="border-left: 1px solid #CCC">334</td>
239
+ <td style="border-left: 1px solid #CCC">333</td>
240
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> Scriptable sharedScope = sharedScope(ctx);</pre></td>
241
+ </tr>
242
+ <tr>
243
+ <td style="border-left: 1px solid #CCC">335</td>
244
+ <td style="border-left: 1px solid #CCC">334</td>
245
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> Scriptable scope = ctx.newObject(sharedScope);</pre></td>
246
+ </tr>
247
+ <tr>
248
+ <td style="border-left: 1px solid #CCC">336</td>
249
+ <td style="border-left: 1px solid #CCC">335</td>
250
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> scope.setParentScope(null);</pre></td>
251
+ </tr>
252
+ <tr style="background-color: #F0F0FF" >
253
+ <td style="border-left: 1px solid #CCC">...</td>
254
+ <td style="border-left: 1px solid #CCC">...</td>
255
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -345,12 +344,10 @@ abstract class BaseTemplate implements Template {</pre></td>
256
+ </tr>
257
+ <tr>
258
+ <td style="border-left: 1px solid #CCC">345</td>
259
+ <td style="border-left: 1px solid #CCC">344</td>
260
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @param ctx A rhino context.</pre></td>
261
+ </tr>
262
+ <tr>
263
+ <td style="border-left: 1px solid #CCC">346</td>
264
+ <td style="border-left: 1px solid #CCC">345</td>
265
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @return A handlebars.js scope. Shared between executions.</pre></td>
266
+ </tr>
267
+ <tr>
268
+ <td style="border-left: 1px solid #CCC">347</td>
269
+ <td style="border-left: 1px solid #CCC">346</td>
270
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td>
271
+ </tr>
272
+ <tr style="background-color: #FDD" >
273
+ <td style="border-left: 1px solid #CCC">348</td>
274
+ <td style="border-left: 1px solid #CCC">.</td>
275
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static Scriptable</pre></td>
276
+ </tr>
277
+ <tr style="background-color: #FDD" >
278
+ <td style="border-left: 1px solid #CCC">349</td>
279
+ <td style="border-left: 1px solid #CCC">.</td>
280
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- sharedScope(final org.mozilla.javascript.Context ctx) {</pre></td>
281
+ </tr>
282
+ <tr style="background-color: #DFD" >
283
+ <td style="border-left: 1px solid #CCC">.</td>
284
+ <td style="border-left: 1px solid #CCC">347</td>
285
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private Scriptable sharedScope(final org.mozilla.javascript.Context ctx) {</pre></td>
286
+ </tr>
287
+ <tr>
288
+ <td style="border-left: 1px solid #CCC">350</td>
289
+ <td style="border-left: 1px solid #CCC">348</td>
290
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> if (sharedScope == null) {</pre></td>
291
+ </tr>
292
+ <tr>
293
+ <td style="border-left: 1px solid #CCC">351</td>
294
+ <td style="border-left: 1px solid #CCC">349</td>
295
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> sharedScope = ctx.initStandardObjects();</pre></td>
296
+ </tr>
297
+ <tr style="background-color: #FDD" >
298
+ <td style="border-left: 1px solid #CCC">352</td>
299
+ <td style="border-left: 1px solid #CCC">.</td>
300
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- ctx.evaluateString(sharedScope, handlebarsScript(HBS_FILE), HBS_FILE, 1,</pre></td>
301
+ </tr>
302
+ <tr style="background-color: #FDD" >
303
+ <td style="border-left: 1px solid #CCC">353</td>
304
+ <td style="border-left: 1px solid #CCC">.</td>
305
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- null);</pre></td>
306
+ </tr>
307
+ <tr style="background-color: #DFD" >
308
+ <td style="border-left: 1px solid #CCC">.</td>
309
+ <td style="border-left: 1px solid #CCC">350</td>
310
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ ctx.evaluateString(sharedScope, handlebarsScript(HBS_FILE), HBS_FILE, 1, null);</pre></td>
311
+ </tr>
312
+ <tr>
313
+ <td style="border-left: 1px solid #CCC">354</td>
314
+ <td style="border-left: 1px solid #CCC">351</td>
315
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
316
+ </tr>
317
+ <tr>
318
+ <td style="border-left: 1px solid #CCC">355</td>
319
+ <td style="border-left: 1px solid #CCC">352</td>
320
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> return sharedScope;</pre></td>
321
+ </tr>
322
+ <tr>
323
+ <td style="border-left: 1px solid #CCC">356</td>
324
+ <td style="border-left: 1px solid #CCC">353</td>
325
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
326
+ </tr>
327
+ <tr style="background-color: #F0F0FF" >
328
+ <td style="border-left: 1px solid #CCC">...</td>
329
+ <td style="border-left: 1px solid #CCC">...</td>
330
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -361,25 +358,11 @@ abstract class BaseTemplate implements Template {</pre></td>
331
+ </tr>
332
+ <tr>
333
+ <td style="border-left: 1px solid #CCC">361</td>
334
+ <td style="border-left: 1px solid #CCC">358</td>
335
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @param location The handlebars.js location.</pre></td>
336
+ </tr>
337
+ <tr>
338
+ <td style="border-left: 1px solid #CCC">362</td>
339
+ <td style="border-left: 1px solid #CCC">359</td>
340
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> * @return The resource content.</pre></td>
341
+ </tr>
342
+ <tr>
343
+ <td style="border-left: 1px solid #CCC">363</td>
344
+ <td style="border-left: 1px solid #CCC">360</td>
345
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> */</pre></td>
346
+ </tr>
347
+ <tr style="background-color: #FDD" >
348
+ <td style="border-left: 1px solid #CCC">364</td>
349
+ <td style="border-left: 1px solid #CCC">.</td>
350
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- private static String handlebarsScript(final String location) {</pre></td>
351
+ </tr>
352
+ <tr style="background-color: #FDD" >
353
+ <td style="border-left: 1px solid #CCC">365</td>
354
+ <td style="border-left: 1px solid #CCC">.</td>
355
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- InputStream in = BaseTemplate.class.getResourceAsStream(location);</pre></td>
356
+ </tr>
357
+ <tr style="background-color: #FDD" >
358
+ <td style="border-left: 1px solid #CCC">366</td>
359
+ <td style="border-left: 1px solid #CCC">.</td>
360
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- notNull(in, &quot;Handlebars.js script not found at &quot; + location);</pre></td>
361
+ </tr>
362
+ <tr style="background-color: #DFD" >
363
+ <td style="border-left: 1px solid #CCC">.</td>
364
+ <td style="border-left: 1px solid #CCC">361</td>
365
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ private String handlebarsScript(final String location) {</pre></td>
366
+ </tr>
367
+ <tr>
368
+ <td style="border-left: 1px solid #CCC">367</td>
369
+ <td style="border-left: 1px solid #CCC">362</td>
370
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> try {</pre></td>
371
+ </tr>
372
+ <tr style="background-color: #FDD" >
373
+ <td style="border-left: 1px solid #CCC">368</td>
374
+ <td style="border-left: 1px solid #CCC">.</td>
375
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- int ch = in.read();</pre></td>
376
+ </tr>
377
+ <tr style="background-color: #FDD" >
378
+ <td style="border-left: 1px solid #CCC">369</td>
379
+ <td style="border-left: 1px solid #CCC">.</td>
380
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- StringBuilder script = new StringBuilder();</pre></td>
381
+ </tr>
382
+ <tr style="background-color: #FDD" >
383
+ <td style="border-left: 1px solid #CCC">370</td>
384
+ <td style="border-left: 1px solid #CCC">.</td>
385
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- while (ch != -1) {</pre></td>
386
+ </tr>
387
+ <tr style="background-color: #FDD" >
388
+ <td style="border-left: 1px solid #CCC">371</td>
389
+ <td style="border-left: 1px solid #CCC">.</td>
390
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- script.append((char) ch);</pre></td>
391
+ </tr>
392
+ <tr style="background-color: #FDD" >
393
+ <td style="border-left: 1px solid #CCC">372</td>
394
+ <td style="border-left: 1px solid #CCC">.</td>
395
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- ch = in.read();</pre></td>
396
+ </tr>
397
+ <tr style="background-color: #FDD" >
398
+ <td style="border-left: 1px solid #CCC">373</td>
399
+ <td style="border-left: 1px solid #CCC">.</td>
400
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td>
401
+ </tr>
402
+ <tr style="background-color: #FDD" >
403
+ <td style="border-left: 1px solid #CCC">374</td>
404
+ <td style="border-left: 1px solid #CCC">.</td>
405
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- return script.toString();</pre></td>
406
+ </tr>
407
+ <tr style="background-color: #DFD" >
408
+ <td style="border-left: 1px solid #CCC">.</td>
409
+ <td style="border-left: 1px solid #CCC">363</td>
410
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ return Files.read(location);</pre></td>
411
+ </tr>
412
+ <tr>
413
+ <td style="border-left: 1px solid #CCC">375</td>
414
+ <td style="border-left: 1px solid #CCC">364</td>
415
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> } catch (IOException ex) {</pre></td>
416
+ </tr>
417
+ <tr style="background-color: #FDD" >
418
+ <td style="border-left: 1px solid #CCC">376</td>
419
+ <td style="border-left: 1px solid #CCC">.</td>
420
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- throw new IllegalStateException(&quot;Unable to read file &quot; + location);</pre></td>
421
+ </tr>
422
+ <tr style="background-color: #FDD" >
423
+ <td style="border-left: 1px solid #CCC">377</td>
424
+ <td style="border-left: 1px solid #CCC">.</td>
425
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- } finally {</pre></td>
426
+ </tr>
427
+ <tr style="background-color: #FDD" >
428
+ <td style="border-left: 1px solid #CCC">378</td>
429
+ <td style="border-left: 1px solid #CCC">.</td>
430
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- try {</pre></td>
431
+ </tr>
432
+ <tr style="background-color: #FDD" >
433
+ <td style="border-left: 1px solid #CCC">379</td>
434
+ <td style="border-left: 1px solid #CCC">.</td>
435
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- in.close();</pre></td>
436
+ </tr>
437
+ <tr style="background-color: #FDD" >
438
+ <td style="border-left: 1px solid #CCC">380</td>
439
+ <td style="border-left: 1px solid #CCC">.</td>
440
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- } catch (IOException ex) {</pre></td>
441
+ </tr>
442
+ <tr style="background-color: #FDD" >
443
+ <td style="border-left: 1px solid #CCC">381</td>
444
+ <td style="border-left: 1px solid #CCC">.</td>
445
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- throw new IllegalStateException(&quot;Unable to close file &quot; + location);</pre></td>
446
+ </tr>
447
+ <tr style="background-color: #FDD" >
448
+ <td style="border-left: 1px solid #CCC">382</td>
449
+ <td style="border-left: 1px solid #CCC">.</td>
450
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td>
451
+ </tr>
452
+ <tr style="background-color: #DFD" >
453
+ <td style="border-left: 1px solid #CCC">.</td>
454
+ <td style="border-left: 1px solid #CCC">365</td>
455
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ throw new IllegalArgumentException(&quot;Unable to read file: &quot; + location, ex);</pre></td>
456
+ </tr>
457
+ <tr>
458
+ <td style="border-left: 1px solid #CCC">383</td>
459
+ <td style="border-left: 1px solid #CCC">366</td>
460
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
461
+ </tr>
462
+ <tr>
463
+ <td style="border-left: 1px solid #CCC">384</td>
464
+ <td style="border-left: 1px solid #CCC">367</td>
465
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
466
+ </tr>
467
+ <tr>
468
+ <td style="border-left: 1px solid #CCC">385</td>
469
+ <td style="border-left: 1px solid #CCC">368</td>
470
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
471
+ </tr>
472
+ <tr style="background-color: #F0F0FF" >
473
+ <td style="border-left: 1px solid #CCC">...</td>
474
+ <td style="border-left: 1px solid #CCC">...</td>
475
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #888"><pre>@@ -2,32 +2,32 @@ package com.github.jknack.handlebars;</pre></td>
476
+ </tr>
477
+ <tr>
478
+ <td style="border-left: 1px solid #CCC">2</td>
479
+ <td style="border-left: 1px solid #CCC">2</td>
480
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
481
+ </tr>
482
+ <tr>
483
+ <td style="border-left: 1px solid #CCC">3</td>
484
+ <td style="border-left: 1px solid #CCC">3</td>
485
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import static org.junit.Assert.assertEquals;</pre></td>
486
+ </tr>
487
+ <tr>
488
+ <td style="border-left: 1px solid #CCC">4</td>
489
+ <td style="border-left: 1px solid #CCC">4</td>
490
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
491
+ </tr>
492
+ <tr style="background-color: #FDD" >
493
+ <td style="border-left: 1px solid #CCC">5</td>
494
+ <td style="border-left: 1px solid #CCC">.</td>
495
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>-import org.junit.Test;</pre></td>
496
+ </tr>
497
+ <tr style="background-color: #FDD" >
498
+ <td style="border-left: 1px solid #CCC">6</td>
499
+ <td style="border-left: 1px solid #CCC">.</td>
500
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>-</pre></td>
501
+ </tr>
502
+ <tr>
503
+ <td style="border-left: 1px solid #CCC">7</td>
504
+ <td style="border-left: 1px solid #CCC">5</td>
505
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> import java.io.IOException;</pre></td>
506
+ </tr>
507
+ <tr>
508
+ <td style="border-left: 1px solid #CCC">8</td>
509
+ <td style="border-left: 1px solid #CCC">6</td>
510
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
511
+ </tr>
512
+ <tr style="background-color: #DFD" >
513
+ <td style="border-left: 1px solid #CCC">.</td>
514
+ <td style="border-left: 1px solid #CCC">7</td>
515
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+import org.junit.Test;</pre></td>
516
+ </tr>
517
+ <tr style="background-color: #DFD" >
518
+ <td style="border-left: 1px solid #CCC">.</td>
519
+ <td style="border-left: 1px solid #CCC">8</td>
520
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+</pre></td>
521
+ </tr>
522
+ <tr>
523
+ <td style="border-left: 1px solid #CCC">9</td>
524
+ <td style="border-left: 1px solid #CCC">9</td>
525
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> public class ToStringTest {</pre></td>
526
+ </tr>
527
+ <tr>
528
+ <td style="border-left: 1px solid #CCC">10</td>
529
+ <td style="border-left: 1px solid #CCC">10</td>
530
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
531
+ </tr>
532
+ <tr style="background-color: #FDD" >
533
+ <td style="border-left: 1px solid #CCC">11</td>
534
+ <td style="border-left: 1px solid #CCC">.</td>
535
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public static class UnsafeString {</pre></td>
536
+ </tr>
537
+ <tr style="background-color: #FDD" >
538
+ <td style="border-left: 1px solid #CCC">12</td>
539
+ <td style="border-left: 1px solid #CCC">.</td>
540
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- String underlying;</pre></td>
541
+ </tr>
542
+ <tr style="background-color: #DFD" >
543
+ <td style="border-left: 1px solid #CCC">.</td>
544
+ <td style="border-left: 1px solid #CCC">11</td>
545
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public static class UnsafeString {</pre></td>
546
+ </tr>
547
+ <tr style="background-color: #DFD" >
548
+ <td style="border-left: 1px solid #CCC">.</td>
549
+ <td style="border-left: 1px solid #CCC">12</td>
550
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ String underlying;</pre></td>
551
+ </tr>
552
+ <tr>
553
+ <td style="border-left: 1px solid #CCC">13</td>
554
+ <td style="border-left: 1px solid #CCC">13</td>
555
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
556
+ </tr>
557
+ <tr style="background-color: #FDD" >
558
+ <td style="border-left: 1px solid #CCC">14</td>
559
+ <td style="border-left: 1px solid #CCC">.</td>
560
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public UnsafeString(String underlying) {</pre></td>
561
+ </tr>
562
+ <tr style="background-color: #FDD" >
563
+ <td style="border-left: 1px solid #CCC">15</td>
564
+ <td style="border-left: 1px solid #CCC">.</td>
565
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- this.underlying = underlying;</pre></td>
566
+ </tr>
567
+ <tr style="background-color: #FDD" >
568
+ <td style="border-left: 1px solid #CCC">16</td>
569
+ <td style="border-left: 1px solid #CCC">.</td>
570
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td>
571
+ </tr>
572
+ <tr style="background-color: #DFD" >
573
+ <td style="border-left: 1px solid #CCC">.</td>
574
+ <td style="border-left: 1px solid #CCC">14</td>
575
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public UnsafeString(final String underlying) {</pre></td>
576
+ </tr>
577
+ <tr style="background-color: #DFD" >
578
+ <td style="border-left: 1px solid #CCC">.</td>
579
+ <td style="border-left: 1px solid #CCC">15</td>
580
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ this.underlying = underlying;</pre></td>
581
+ </tr>
582
+ <tr style="background-color: #DFD" >
583
+ <td style="border-left: 1px solid #CCC">.</td>
584
+ <td style="border-left: 1px solid #CCC">16</td>
585
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ }</pre></td>
586
+ </tr>
587
+ <tr>
588
+ <td style="border-left: 1px solid #CCC">17</td>
589
+ <td style="border-left: 1px solid #CCC">17</td>
590
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
591
+ </tr>
592
+ <tr style="background-color: #FDD" >
593
+ <td style="border-left: 1px solid #CCC">18</td>
594
+ <td style="border-left: 1px solid #CCC">.</td>
595
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- @Override</pre></td>
596
+ </tr>
597
+ <tr style="background-color: #FDD" >
598
+ <td style="border-left: 1px solid #CCC">19</td>
599
+ <td style="border-left: 1px solid #CCC">.</td>
600
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public String toString() {</pre></td>
601
+ </tr>
602
+ <tr style="background-color: #FDD" >
603
+ <td style="border-left: 1px solid #CCC">20</td>
604
+ <td style="border-left: 1px solid #CCC">.</td>
605
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- return &quot;&lt;h1&gt;&quot; + underlying + &quot;&lt;/h1&gt;&quot;;</pre></td>
606
+ </tr>
607
+ <tr style="background-color: #FDD" >
608
+ <td style="border-left: 1px solid #CCC">21</td>
609
+ <td style="border-left: 1px solid #CCC">.</td>
610
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td>
611
+ </tr>
612
+ <tr style="background-color: #DFD" >
613
+ <td style="border-left: 1px solid #CCC">.</td>
614
+ <td style="border-left: 1px solid #CCC">18</td>
615
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ @Override</pre></td>
616
+ </tr>
617
+ <tr style="background-color: #DFD" >
618
+ <td style="border-left: 1px solid #CCC">.</td>
619
+ <td style="border-left: 1px solid #CCC">19</td>
620
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public String toString() {</pre></td>
621
+ </tr>
622
+ <tr style="background-color: #DFD" >
623
+ <td style="border-left: 1px solid #CCC">.</td>
624
+ <td style="border-left: 1px solid #CCC">20</td>
625
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ return &quot;&lt;h1&gt;&quot; + underlying + &quot;&lt;/h1&gt;&quot;;</pre></td>
626
+ </tr>
627
+ <tr>
628
+ <td style="border-left: 1px solid #CCC">22</td>
629
+ <td style="border-left: 1px solid #CCC">21</td>
630
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
631
+ </tr>
632
+ <tr style="background-color: #DFD" >
633
+ <td style="border-left: 1px solid #CCC">.</td>
634
+ <td style="border-left: 1px solid #CCC">22</td>
635
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ }</pre></td>
636
+ </tr>
637
+ <tr>
638
+ <td style="border-left: 1px solid #CCC">23</td>
639
+ <td style="border-left: 1px solid #CCC">23</td>
640
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
641
+ </tr>
642
+ <tr style="background-color: #FDD" >
643
+ <td style="border-left: 1px solid #CCC">24</td>
644
+ <td style="border-left: 1px solid #CCC">.</td>
645
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- @Test</pre></td>
646
+ </tr>
647
+ <tr style="background-color: #FDD" >
648
+ <td style="border-left: 1px solid #CCC">25</td>
649
+ <td style="border-left: 1px solid #CCC">.</td>
650
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- public void unsafeString() throws IOException {</pre></td>
651
+ </tr>
652
+ <tr style="background-color: #FDD" >
653
+ <td style="border-left: 1px solid #CCC">26</td>
654
+ <td style="border-left: 1px solid #CCC">.</td>
655
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- Handlebars handlebars = new Handlebars();</pre></td>
656
+ </tr>
657
+ <tr style="background-color: #FDD" >
658
+ <td style="border-left: 1px solid #CCC">27</td>
659
+ <td style="border-left: 1px solid #CCC">.</td>
660
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- Template template = handlebars.compileInline(&quot;{{this}}&quot;);</pre></td>
661
+ </tr>
662
+ <tr style="background-color: #DFD" >
663
+ <td style="border-left: 1px solid #CCC">.</td>
664
+ <td style="border-left: 1px solid #CCC">24</td>
665
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ @Test</pre></td>
666
+ </tr>
667
+ <tr style="background-color: #DFD" >
668
+ <td style="border-left: 1px solid #CCC">.</td>
669
+ <td style="border-left: 1px solid #CCC">25</td>
670
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ public void unsafeString() throws IOException {</pre></td>
671
+ </tr>
672
+ <tr style="background-color: #DFD" >
673
+ <td style="border-left: 1px solid #CCC">.</td>
674
+ <td style="border-left: 1px solid #CCC">26</td>
675
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ Handlebars handlebars = new Handlebars();</pre></td>
676
+ </tr>
677
+ <tr style="background-color: #DFD" >
678
+ <td style="border-left: 1px solid #CCC">.</td>
679
+ <td style="border-left: 1px solid #CCC">27</td>
680
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ Template template = handlebars.compileInline(&quot;{{this}}&quot;);</pre></td>
681
+ </tr>
682
+ <tr>
683
+ <td style="border-left: 1px solid #CCC">28</td>
684
+ <td style="border-left: 1px solid #CCC">28</td>
685
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
686
+ </tr>
687
+ <tr style="background-color: #FDD" >
688
+ <td style="border-left: 1px solid #CCC">29</td>
689
+ <td style="border-left: 1px solid #CCC">.</td>
690
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- String result = template.apply(new UnsafeString(&quot;Hello&quot;));</pre></td>
691
+ </tr>
692
+ <tr style="background-color: #DFD" >
693
+ <td style="border-left: 1px solid #CCC">.</td>
694
+ <td style="border-left: 1px solid #CCC">29</td>
695
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ String result = template.apply(new UnsafeString(&quot;Hello&quot;));</pre></td>
696
+ </tr>
697
+ <tr>
698
+ <td style="border-left: 1px solid #CCC">30</td>
699
+ <td style="border-left: 1px solid #CCC">30</td>
700
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> </pre></td>
701
+ </tr>
702
+ <tr style="background-color: #FDD" >
703
+ <td style="border-left: 1px solid #CCC">31</td>
704
+ <td style="border-left: 1px solid #CCC">.</td>
705
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- assertEquals(&quot;&amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;&quot;, result);</pre></td>
706
+ </tr>
707
+ <tr style="background-color: #FDD" >
708
+ <td style="border-left: 1px solid #CCC">32</td>
709
+ <td style="border-left: 1px solid #CCC">.</td>
710
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>- }</pre></td>
711
+ </tr>
712
+ <tr style="background-color: #DFD" >
713
+ <td style="border-left: 1px solid #CCC">.</td>
714
+ <td style="border-left: 1px solid #CCC">31</td>
715
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ assertEquals(&quot;&amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;&quot;, result);</pre></td>
716
+ </tr>
717
+ <tr style="background-color: #DFD" >
718
+ <td style="border-left: 1px solid #CCC">.</td>
719
+ <td style="border-left: 1px solid #CCC">32</td>
720
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre>+ }</pre></td>
721
+ </tr>
722
+ <tr>
723
+ <td style="border-left: 1px solid #CCC">33</td>
724
+ <td style="border-left: 1px solid #CCC">33</td>
725
+ <td style="border-left: 1px solid #CCC; border-right: 1px solid #CCC; color: #000"><pre> }</pre></td>
726
+ </tr>
727
+ </table>