doc/api/classes/String.html in erbook-7.1.1 vs doc/api/classes/String.html in erbook-7.3.0
- old
+ new
@@ -47,13 +47,13 @@
<dt>T</dt>
<dd>
<ul>
- <li><a href="#M000001">to_inline_xhtml</a>,</li>
+ <li><a href="#M000044">to_inline_xhtml</a>,</li>
- <li><a href="#M000004">to_xhtml</a></li>
+ <li><a href="#M000045">to_xhtml</a></li>
</ul>
</dd>
</dl>
@@ -110,13 +110,13 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
- <div class="title" id="M000001">
+ <div class="title" id="M000044">
- <a name="M000001"></a><b>to_inline_xhtml</b>()
+ <a name="M000044"></a><b>to_inline_xhtml</b>()
</div>
<div class="description">
<p>
@@ -129,29 +129,29 @@
<div class="sourcecode">
<p class="source-link">
- Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
+ Source: <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show</a>
- | <a href="http://github.com/sunaku/erbook/blob/9c3f6ad5c94f67d3f20e896873dbc7b127036c44/lib/erbook/to_xhtml.rb#L50" target="_blank" class="github_url">on GitHub</a>
+ | <a href="http://github.com/sunaku/erbook/blob/af5b6a4baba28349d216740335a2e461728f59d5/lib/erbook/to_xhtml.rb#L50" target="_blank" class="github_url">on GitHub</a>
</p>
- <div id="M000001_source" class="dyn-source">
+ <div id="M000044_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/erbook/to_xhtml.rb, line 50</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_inline_xhtml</span>
<span class="ruby-identifier">to_xhtml</span> <span class="ruby-keyword kw">true</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
- <div class="title" id="M000004">
+ <div class="title" id="M000045">
- <a name="M000004"></a><b>to_xhtml</b>(inline = false)
+ <a name="M000045"></a><b>to_xhtml</b>(inline = false)
</div>
<div class="description">
<p>
@@ -170,24 +170,29 @@
<div class="sourcecode">
<p class="source-link">
- Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
+ Source: <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show</a>
- | <a href="http://github.com/sunaku/erbook/blob/9c3f6ad5c94f67d3f20e896873dbc7b127036c44/lib/erbook/to_xhtml.rb#L62" target="_blank" class="github_url">on GitHub</a>
+ | <a href="http://github.com/sunaku/erbook/blob/af5b6a4baba28349d216740335a2e461728f59d5/lib/erbook/to_xhtml.rb#L62" target="_blank" class="github_url">on GitHub</a>
</p>
- <div id="M000004_source" class="dyn-source">
+ <div id="M000045_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/erbook/to_xhtml.rb, line 62</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xhtml</span> <span class="ruby-identifier">inline</span> = <span class="ruby-keyword kw">false</span>
<span class="ruby-identifier">with_protected_tags</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-constant">VERBATIM_TAGS</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">text</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">html</span> = <span class="ruby-identifier">with_protected_tags</span>(<span class="ruby-identifier">text</span>, <span class="ruby-constant">PROTECTED_TAGS</span>, <span class="ruby-keyword kw">false</span>) <span class="ruby-keyword kw">do</span>
<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">thru_maruku</span> <span class="ruby-identifier">inline</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-comment cmt"># Markdown's "code spans" should really be "pre spans"</span>
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(<pre>)<code>(.*?)</code>(</pre>)}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'\1\2\3'</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-comment cmt"># allow "code spans" annotated with Maruku's IAL (Inline</span>
+ <span class="ruby-comment cmt"># Attribute List) Markdown extension to be syntax colored</span>
+ <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{<pre[^>]+>(<code[^>]+>.*?</code>)</pre>}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'\1'</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-comment cmt"># allow user to type <pre> blocks on single lines</span>
<span class="ruby-comment cmt"># without affecting the display of their content</span>
<span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(<pre>)[ \t]*\r?\n|\r?\n[ \t]*(</pre>)}</span>, <span class="ruby-value str">'\1\2'</span>
\ No newline at end of file