[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-java2html] single line comments and newlines
From: |
Robert Wetzel |
Subject: |
Re: [Help-java2html] single line comments and newlines |
Date: |
Tue, 3 Apr 2001 12:22:13 +0200 (MET DST) |
Hi again,
> Did this problem take place only for single line comments?
Short answer: Yes.
Long answer:
scanner.ll defines different 'states' for single line and
multi line comments. Currently the following are defined:
<multi-line-comment> ::= "/*" { ... } "*/"
<single-line-comment> ::= "//" { ... } "\n"
This follows the definitions of the Java Language Specification,
section 3.7 (Comments).
Unfortunately, java2html handles these comments as a whole,
adding the 'decorators' only before and after the comments.
As the multi line comments do not end with a newline, they
will be displayed (and rendered) correctly. Single line
comments end with a newline, which is treated as a part of
the comment. That's why the </span> was placed _after_ the
newline. The patch exchanges the order of the end decoration
and the newline for single line comments.
cheers,
Robert.