[as2api-dev] code coloring request
David Holroyd
dave at badgers-in-foil.co.uk
Tue, 5 Jul 2005 13:31:23 +0000
On Tue, Jul 05, 2005 at 08:51:54AM -0400, Kristopher Schultz wrote:
> I noticed that when I view the code source exported as part of the the
> API docs that it is nicely color coded. Any chance of applying this same
> code coloring to code placed inside <pre></pre> tags within a doc
> comment?
Heh, I was having thoughts along the same lines. However, I was
thinking that this should happen only to the content of {@code} tags.
I'm reluctant to apply magic processing to the contents of particular
HTML tags, but that's mostly bacause as2api doesn't inspect the HTML at
all; any tags are just passed through verbatim.
Also, if people want to put stuff other than AS into a <pre>, the AS
syntax highlight applied to the content will look messy.
However, before I can add this in, I need to do a bunch of work on the
doc-comment parser. The current, simplistic implementation will not
allow a {@code} tag to span multiple lines, which people are sure to
need.
....Oh dear, I just realised that closing braces will need fairly
cunning handling,
i.e
{@code while(true) { ... }}
That could be done with brace matching I guess.
What do you think?
dave
--
http://david.holroyd.me.uk/