Skip to content

Commit

Permalink
Generate (2b47b16)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 17, 2024
1 parent b4d7e21 commit 7a5ccdd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
6 changes: 3 additions & 3 deletions REXML/Parsers/BaseParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ <h3>Public Instance Methods</h3>


<div class="method-source-code" id="entity-source">
<pre><span class="ruby-comment"># File lib/rexml/parsers/baseparser.rb, line 526</span>
<pre><span class="ruby-comment"># File lib/rexml/parsers/baseparser.rb, line 530</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">entity</span>( <span class="ruby-identifier">reference</span>, <span class="ruby-identifier">entities</span> )
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">entities</span>

Expand Down Expand Up @@ -439,7 +439,7 @@ <h3>Public Instance Methods</h3>
<p>Escapes all possible entities</p>

<div class="method-source-code" id="normalize-source">
<pre><span class="ruby-comment"># File lib/rexml/parsers/baseparser.rb, line 537</span>
<pre><span class="ruby-comment"># File lib/rexml/parsers/baseparser.rb, line 541</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">normalize</span>( <span class="ruby-identifier">input</span>, <span class="ruby-identifier">entities</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">entity_filter</span>=<span class="ruby-keyword">nil</span> )
<span class="ruby-identifier">copy</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">clone</span>
<span class="ruby-comment"># Doing it like this rather than in a loop improves the speed</span>
Expand Down Expand Up @@ -593,7 +593,7 @@ <h3>Public Instance Methods</h3>
<p>Unescapes all possible entities</p>

<div class="method-source-code" id="unnormalize-source">
<pre><span class="ruby-comment"># File lib/rexml/parsers/baseparser.rb, line 553</span>
<pre><span class="ruby-comment"># File lib/rexml/parsers/baseparser.rb, line 557</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">unnormalize</span>( <span class="ruby-identifier">string</span>, <span class="ruby-identifier">entities</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter</span>=<span class="ruby-keyword">nil</span> )
<span class="ruby-keyword">if</span> <span class="ruby-identifier">string</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;\r&quot;</span>)
<span class="ruby-identifier">rv</span> = <span class="ruby-identifier">string</span>.<span class="ruby-identifier">gsub</span>( <span class="ruby-constant">Private</span><span class="ruby-operator">::</span><span class="ruby-constant">CARRIAGE_RETURN_NEWLINE_PATTERN</span>, <span class="ruby-string">&quot;\n&quot;</span> )
Expand Down
12 changes: 2 additions & 10 deletions REXML/Parsers/StreamParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ <h3>Public Class Methods</h3>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> <span class="ruby-identifier">source</span>, <span class="ruby-identifier">listener</span>
<span class="ruby-ivar">@listener</span> = <span class="ruby-identifier">listener</span>
<span class="ruby-ivar">@parser</span> = <span class="ruby-constant">BaseParser</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">source</span> )
<span class="ruby-ivar">@tag_stack</span> = []
<span class="ruby-keyword">end</span></pre>
</div>
</div>
Expand Down Expand Up @@ -146,7 +145,7 @@ <h3>Public Instance Methods</h3>


<div class="method-source-code" id="add_listener-source">
<pre><span class="ruby-comment"># File lib/rexml/parsers/streamparser.rb, line 13</span>
<pre><span class="ruby-comment"># File lib/rexml/parsers/streamparser.rb, line 12</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_listener</span>( <span class="ruby-identifier">listener</span> )
<span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">add_listener</span>( <span class="ruby-identifier">listener</span> )
<span class="ruby-keyword">end</span></pre>
Expand All @@ -169,28 +168,21 @@ <h3>Public Instance Methods</h3>


<div class="method-source-code" id="parse-source">
<pre><span class="ruby-comment"># File lib/rexml/parsers/streamparser.rb, line 17</span>
<pre><span class="ruby-comment"># File lib/rexml/parsers/streamparser.rb, line 16</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>
<span class="ruby-comment"># entity string</span>
<span class="ruby-keyword">while</span> <span class="ruby-keyword">true</span>
<span class="ruby-identifier">event</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">pull</span>
<span class="ruby-keyword">case</span> <span class="ruby-identifier">event</span>[<span class="ruby-value">0</span>]
<span class="ruby-keyword">when</span> <span class="ruby-value">:end_document</span>
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@tag_stack</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-identifier">tag_path</span> = <span class="ruby-string">&quot;/&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@tag_stack</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;/&quot;</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ParseException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;Missing end tag for &#39;#{tag_path}&#39;&quot;</span>,
<span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">source</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">return</span>
<span class="ruby-keyword">when</span> <span class="ruby-value">:start_element</span>
<span class="ruby-ivar">@tag_stack</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">event</span>[<span class="ruby-value">1</span>]
<span class="ruby-identifier">attrs</span> = <span class="ruby-identifier">event</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">event</span>[<span class="ruby-value">2</span>][<span class="ruby-identifier">n</span>] = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">unnormalize</span>( <span class="ruby-identifier">v</span> )
<span class="ruby-keyword">end</span>
<span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">tag_start</span>( <span class="ruby-identifier">event</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">attrs</span> )
<span class="ruby-keyword">when</span> <span class="ruby-value">:end_element</span>
<span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">tag_end</span>( <span class="ruby-identifier">event</span>[<span class="ruby-value">1</span>] )
<span class="ruby-ivar">@tag_stack</span>.<span class="ruby-identifier">pop</span>
<span class="ruby-keyword">when</span> <span class="ruby-value">:text</span>
<span class="ruby-identifier">unnormalized</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">unnormalize</span>( <span class="ruby-identifier">event</span>[<span class="ruby-value">1</span>] )
<span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">text</span>( <span class="ruby-identifier">unnormalized</span> )
Expand Down
7 changes: 0 additions & 7 deletions REXML/Parsers/TreeParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,27 +170,20 @@ <h3>Public Instance Methods</h3>
<div class="method-source-code" id="parse-source">
<pre><span class="ruby-comment"># File lib/rexml/parsers/treeparser.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>
<span class="ruby-identifier">tag_stack</span> = []
<span class="ruby-identifier">entities</span> = <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">begin</span>
<span class="ruby-keyword">while</span> <span class="ruby-keyword">true</span>
<span class="ruby-identifier">event</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">pull</span>
<span class="ruby-comment">#STDERR.puts &quot;TREEPARSER GOT #{event.inspect}&quot;</span>
<span class="ruby-keyword">case</span> <span class="ruby-identifier">event</span>[<span class="ruby-value">0</span>]
<span class="ruby-keyword">when</span> <span class="ruby-value">:end_document</span>
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">tag_stack</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ParseException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;No close tag for #{@build_context.xpath}&quot;</span>,
<span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">source</span>, <span class="ruby-ivar">@parser</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">return</span>
<span class="ruby-keyword">when</span> <span class="ruby-value">:start_element</span>
<span class="ruby-identifier">tag_stack</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">event</span>[<span class="ruby-value">1</span>])
<span class="ruby-identifier">el</span> = <span class="ruby-ivar">@build_context</span> = <span class="ruby-ivar">@build_context</span>.<span class="ruby-identifier">add_element</span>( <span class="ruby-identifier">event</span>[<span class="ruby-value">1</span>] )
<span class="ruby-identifier">event</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">el</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">key</span>]=<span class="ruby-constant">Attribute</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span>,<span class="ruby-keyword">self</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">when</span> <span class="ruby-value">:end_element</span>
<span class="ruby-identifier">tag_stack</span>.<span class="ruby-identifier">pop</span>
<span class="ruby-ivar">@build_context</span> = <span class="ruby-ivar">@build_context</span>.<span class="ruby-identifier">parent</span>
<span class="ruby-keyword">when</span> <span class="ruby-value">:text</span>
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@build_context</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Text</span>
Expand Down
Binary file modified js/search_index.js.gz
Binary file not shown.

0 comments on commit 7a5ccdd

Please sign in to comment.