[Mono-docs-list] Differences between generic names in the documentation.

Jonathan Pryor jonpryor at vt.edu
Wed Dec 12 05:57:27 EST 2007


On Sat, 2007-12-08 at 12:04 +0100, Valentin Sawadski wrote:
> But then again it seems that the browser uses the Test<T>
> everywhere. Sometimes it gets parsed and will be displayed as Test<T>
> but other times not and some ugly HTML-Entities are being shown as the
> class name.

After looking into this further, I *think* this is a GTKHTML rendering
bug.

What I -- and most people -- expect to happen when "&lt;" is used in
HTML is for '<' to be rendered instead.  (After all, it *is* the escape
character for '<'.)

However, GTKHTML only occasionally does this replacement -- when the
&lt; is NOT part of a link.  If it's used within an <a/> tag (either the
href attribute or the text itself) &lt; is NOT replaced with '<'.

You can see this via `monodoc 'M:System.Array.AsReadOnly<T>'` -- the
page title is correct ("System.Array.AsReadOnly<T> Method"), as is the
method prototype and inline text such as the "IList<T>" in the Remarks
section, but any instances of &lt; that are part of a link are NOT
properly translated.  I think it's GTKHTML because `monodoc --html`
doesn't have e.g. "&amp;lt;" for &lt; within links, but just &lt;, and
monodoc still displays "&lt;" instead of '<'.

This is bad, because it makes the most important pieces of text -- the
links -- look wrong.

I think when I first worked on Generics support in monodoc I was using
Gecko; unfortunately, it crashes instantly now, so that's not really an
option.

Furthermore, clicking on a link containing &lt; results in a Url
containing &lt;, which (as mentioned elsewhere) the monodoc engine
doesn't like -- it expects <> to be used.

I've just committed a fix to docbrowser so that GtkHtmlRenderer will
"correct" the URLs before it sends them to the core, so at least you can
now click on links to Generic types/methods and actually go somewhere,
but the rendering is still wrong, and I don't know how to fix that short
of fixing GTKHTML (argh!) or switching to Gecko (crash!).

 - Jon




More information about the Mono-docs-list mailing list