<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>trunk/as2api/output/html</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">html_framework.rb</a></tt></td><td align="right" id="added">+51</td><td align="right" id="removed">-43</td><td nowrap="nowrap" align="center">282 -> 283</td></tr>
</table>
<div class="tasklist"><ul>
<li><a href="#task1">FIXME: Seem to have missed generating title attribute in several cases,</a></li>
<li><a href="#task2">FIXME: doesn't handle case where we have some link text</a></li>
</ul></div>
<pre class="comment">
refactor that bad-boy!
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">trunk/as2api/output/html</span><br />
<div class="fileheader"><big><b>html_framework.rb</b></big> <small id="info">282 -> 283</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/output/html/html_framework.rb        2006-02-26 15:59:28 UTC (rev 282)
+++ trunk/as2api/output/html/html_framework.rb        2006-02-26 16:07:25 UTC (rev 283)
@@ -377,59 +377,67 @@
</small></pre><pre class="diff" id="context"> passthrough(inline) # allow HTML through unabused (though I wish it were
# easy to require it be valid XHTML)
elsif inline.is_a?(LinkTag)
</pre><pre class="diff" id="removed">- # FIXME: Seem to have missed generating title attribute in several cases,
- if inline.target && inline.member
-        if inline.target.resolved?
-         href = link_for_type(inline.target.resolved_type)
-         if inline.member =~ /\(/
-         target = "##{$`}"
-         else
-         target = "##{inline.member}"
-         end
-         href << target
-         html_a("href"=>href) do
-         if inline.text && inline.text!=""
-         pcdata(inline.text)
-         else
-         pcdata("#{inline.target.name}.#{inline.member}")
-         end
-         end
-        else
-         pcdata("#{inline.target.name}##{inline.member}")
-        end
- elsif inline.target
-        # FIXME: doesn't handle case where we have some link text
-        link_type_proxy(inline.target)
- else
-        if inline.member =~ /\(/
-         target = "##{$`}"
-        else
-         target = "##{inline.member}"
-        end
-        html_a("href"=>target) do
</pre><pre class="diff" id="added">+ output_doccomment_linktag(inline)
+ elsif inline.is_a?(CodeTag)
+ output_doccomment_codetag(inline)
+ else
+ html_em(inline.inspect)
+ end
+ end
+
+ def output_doccomment_linktag(inline)
<a name="task1" />+ # <span class="task">FIXME</span>: Seem to have missed generating title attribute in several cases,
+ if inline.target && inline.member
+ if inline.target.resolved?
+        href = link_for_type(inline.target.resolved_type)
+ if inline.member =~ /\(/
+ target = "##{$`}"
+ else
+ target = "##{inline.member}"
+ end
+        href << target
+        html_a("href"=>href) do
</pre><pre class="diff" id="context">          if inline.text && inline.text!=""
         pcdata(inline.text)
         else
</pre><pre class="diff" id="removed">-         pcdata(inline.member)
</pre><pre class="diff" id="added">+         pcdata("#{inline.target.name}.#{inline.member}")
</pre><pre class="diff" id="context">          end
        end
</pre><pre class="diff" id="added">+ else
+        pcdata("#{inline.target.name}##{inline.member}")
</pre><pre class="diff" id="context"> end
</pre><pre class="diff" id="removed">- elsif inline.is_a?(CodeTag)
- input = StringIO.new(inline.text)
- input.lineno = inline.lineno
- highlight = CodeHighlighter.new
- highlight.number_lines = false
- if inline.text =~ /[\n\r]/
-        html_pre do
-         highlight.highlight(input, self)
-        end
</pre><pre class="diff" id="added">+ elsif inline.target
<a name="task2" />+ # <span class="task">FIXME</span>: doesn't handle case where we have some link text
+ link_type_proxy(inline.target)
+ else
+ if inline.member =~ /\(/
+ target = "##{$`}"
</pre><pre class="diff" id="context"> else
</pre><pre class="diff" id="removed">-        html_code do
-         highlight.highlight(input.strip, self)
</pre><pre class="diff" id="added">+ target = "##{inline.member}"
+ end
+ html_a("href"=>target) do
+        if inline.text && inline.text!=""
+         pcdata(inline.text)
+        else
+         pcdata(inline.member)
</pre><pre class="diff" id="context">         end
end
</pre><pre class="diff" id="added">+ end
+ end
+
+ def output_doccomment_codetag(inline)
+ input = StringIO.new(inline.text)
+ input.lineno = inline.lineno
+ highlight = CodeHighlighter.new
+ highlight.number_lines = false
+ if inline.text =~ /[\n\r]/
+ html_pre do
+        highlight.highlight(input, self)
+ end
</pre><pre class="diff" id="context"> else
</pre><pre class="diff" id="removed">- html_em(inline.inspect)
</pre><pre class="diff" id="added">+ html_code do
+        highlight.highlight(input.strip, self)
+ end
</pre><pre class="diff" id="context"> end
end
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.11</small></center>
</body></html>