`ri -f HTML` doesn't render the constant section correctly (see the  
output for String, for example). DefaultDisplay#display_class_info  
passes the name of the constant as the prefix argument to  
TextFormatter#wrap, and HTMLFormatter ignores the prefix argument.  
This seems to be true for both 1.8.6 and trunk.

One way to address the problem is the strawman patch below; this  
places the constants in a table. For plain text output, there is an  
extra line between items. That could be fixed, at the risk of mangling  
content which expects extra lines there. And it's perhaps not a great  
idea to reference SM::Flow from ri_display.

--- /usr/lib/ruby/1.8/rdoc/ri/ri_display.pristine.rb	2007-05-18  
23:20:41.000000000 -0400
+++ /usr/lib/ruby/1.8/rdoc/ri/ri_display.rb	2007-05-18  
23:19:02.000000000 -0400
@@ -105,13 +110,18 @@
        unless klass.constants.empty?
          @formatter.blankline
          @formatter.display_heading("Constants:", 2, "")
-        len = 0
-        klass.constants.each { |c| len = c.name.length if  
c.name.length > len }
-        len += 2
+
+        list = SM::Flow::LIST.new(SM::ListBase::NOTE)
+
          klass.constants.each do |c|
-          @formatter.wrap(c.value,
-                          @formatter.indent+((c.name+":").ljust(len)))
+          item = SM::Flow::LI.new
+          item.label = c.name
+          item.body  = c.value
+          list << item
          end
+
+        @formatter.display_list(list)
        end

        unless klass.class_methods.empty?