Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Search Repo:
Make untouched stack portion green, boldify format
drbrain (author)
Mon Feb 11 20:30:02 -0800 2008
commit  7177df4504b758adad5cceab0eb11cca94006547
tree    3e6479bbbef9110dadd6dd35746f5e95cfaddbf7
parent  9d6e7b20f9daaef1f93391c24b7fe91ac735fa64
...
113
114
115
116
 
117
118
119
120
121
122
123
124
 
 
125
126
127
...
171
172
173
 
 
174
175
176
...
113
114
115
 
116
117
118
119
 
120
121
122
 
123
124
125
126
127
...
171
172
173
174
175
176
177
178
0
@@ -113,15 +113,15 @@ class ToRubiniusOpCode < RDoc::Markup::ToHtmlHyperlink
0
   def make_stack(am, name, stack)
0
     level = stack.first.level
0
 
0
- stack.each do |fragment|
0
+ stack.each_with_index do |fragment, i|
0
       case fragment
0
       when RDoc::Markup::ListStart then
0
         @res << "<table class=\"stack\">\n"
0
- #@res << "<caption>#{name}</caption>"
0
       when RDoc::Markup::ListEnd then
0
         @res << "</table>\n"
0
       when RDoc::Markup::ListItem then
0
- @res << "<tr><td>#{fragment.txt}</td></tr>\n"
0
+ css_class = (i == stack.length - 2) ? ' class="rest"' : nil
0
+ @res << "<tr><td#{css_class}>#{fragment.txt}</td></tr>\n"
0
       else
0
         raise "Unknown fragment #{fragment.inspect}"
0
       end
0
@@ -171,6 +171,8 @@ classes.each do |klass|
0
 
0
     next if bytecode.nil?
0
 
0
+ content.gsub!(/\[Format\](\s+)(\\\w+)/m, '[Format]\1*\2*')
0
+
0
     content = <<-EOF
0
   = \\#{method.name}
0
 
...
40
41
42
 
 
 
 
43
44
45
...
40
41
42
43
44
45
46
47
48
49
0
@@ -40,6 +40,10 @@ ul#chapters li, ul.toc_subsection li {
0
   text-align: center;
0
 }
0
 
0
+.stack td.rest {
0
+ background-color: lime;
0
+}
0
+
0
 pre {
0
   color: darkblue;
0
   border-width: 1px;

Comments

    No one has commented yet.