<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Yoji SHIDARA <dara****@shida*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-15 17:42:26 +0900 (Wed, 15 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960">58c78f9806741da2b8025b9997e8ec7cfb781960</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">Link to all.html on node.js website
Some entries do not have the corresponding anchor.
In order to fix this, conversion script should be more sophisticated.</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#diff-0">lib/server.js</a></li>
<li><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#diff-1">tools/convert.js</a></li>
<li><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#diff-2">views/search.jade</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/server.js (+9 -0)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L55">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L57">57</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L58">58</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L61">61</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L70">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L71">71</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L72">72</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L73">73</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L74">74</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L75">75</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0L76">76</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R55">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R57">57</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R58">58</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R59">59</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R60">60</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R61">61</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R62">62</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R63">63</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R64">64</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R65">65</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R66">66</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R67">67</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R69">69</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R78">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R79">79</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R80">80</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R81">81</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R82">82</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R83">83</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R84">84</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L0R85">85</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -56,6 +56,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function search(query, callback) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> request.end();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+function titleToId(title) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return title</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .toString()</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .toLowerCase()</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .replace(/[^a-z0-9]+/g, '_')</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .replace(/^_|_$/g, '');</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+}</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> // routings</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> app.get('/', function(request, response){</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return response.render('index.jade', {query: ''});</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -71,6 +79,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">app.get('/search', function(request, response, next) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var locals = {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> querystring: querystring,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ titleToId: titleToId,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> query: query,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> records: results.hits.hit,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> num_found: results.hits.found,</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: tools/convert.js (+11 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L23">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L24">24</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L26">26</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L27">27</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L28">28</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L29">29</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L38">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L39">39</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L40">40</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L41">41</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L42">42</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L43">43</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L44">44</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L48">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L51">51</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L52">52</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L53">53</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L54">54</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L63">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L64">64</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L65">65</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L66">66</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L67">67</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1L70">70</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R23">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R24">24</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R26">26</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R27">27</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R28">28</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R29">29</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R30">30</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R31">31</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R32">32</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R35">35</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R36">36</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R45">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R46">46</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R47">47</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R48">48</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R49">49</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R51">51</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R52">52</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R53">53</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R57">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R60">60</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R61">61</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R62">62</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R63">63</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R64">64</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R73">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R74">74</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R75">75</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R76">76</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R77">77</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R78">78</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R79">79</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L1R80">80</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -24,6 +24,13 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function htmlToText(html, callback) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> });</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+function titleToId(title) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return title</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .toLowerCase()</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .replace(/[^a-z0-9]+/g, '_')</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ .replace(/^_|_$/g, '');</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+}</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> function parse(doc, context) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var item = {};</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -39,6 +46,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function parse(doc, context) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (doc.desc) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> item.desc = doc.desc;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> item.title = context.title;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ item.id = titleToId(context.title);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ console.log([item.id, item.title]);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> item.path = context.path.map(function(item) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return item.title;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }).filter(function(title) {</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -49,6 +58,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function parse(doc, context) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> context.path.push(item);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> for (var type in doc) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ console.log("TYPE", type);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (doc[type] instanceof Array) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> doc[type].forEach(function(subdoc) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> parse(subdoc, context);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -64,7 +74,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function toSdf(records) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var version = (new Date()).getTime();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return records.map(function(record, index) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- console.log(index, record.path, record.title);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ //console.log(index, record.path, record.title);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> type: 'add',</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> id: 'doc_' + index,</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: views/search.jade (+2 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L18">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L19">19</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L20">20</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L21">21</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L22">22</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L23">23</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L24">24</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2L25">25</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R18">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R19">19</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R20">20</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R21">21</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R22">22</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R23">23</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R24">24</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/58c78f9806741da2b8025b9997e8ec7cfb781960#L2R26">26</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -19,7 +19,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">block content</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if records.length > 0</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> each record, index in records</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> .record</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- h2 #{record.data.title}</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ h2</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ a(href="http://nodejs.org/docs/latest/api/all.html#all_"+titleToId(record.data.title), target="_blank")= record.data.title</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> p.path</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> each title, pathIndex in record.data.path</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> span</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>