EVALUATION
Actually this issue needs to be handled at Java compiler level.
atul.dambalkar@eng 1999-05-04
This would nominally be a change to the Java language and so
should be considered carefully. The suggested fix is not
correct.
robert.field@Eng 2000-02-21
Notice that a code in Suggested Fix is included,
although Robert says it is incorrect.
I am converting this to an RFE, as I stated in Comments.
The request is to honor leading spaces inside <pre> tags.
If necessary, add a command line option to do this, to
maintain backward compatibility. It would have to account
for the fact that the method or class itself is indented --
perhaps it should indent only from the column where the <pre> starts.
We get a fair number of requests for this, since people
want to just copy and paste their working code into the
source file (or out of the source file to test it).
doug.kramer@Eng 2001-02-22
There are enough votes and customer calls on this that I believe it should
receive some attention. I'll see if I can get it in to Merlin's 2nd beta.
neal.gafter@Eng 2001-03-06
This RFE has been implemented. Location of implementation:
src/share/javac/com/sun/tools/javac/v8/parser/Scanner.java
jamie.ho@Eng 2001-07-17
|
SUGGESTED FIX
Name: pvC76716 Date: 05/05/99
(Pawel Veselov, ###@###.###)
Okay, I am not belong to here, but I am interested.
This is not fully a bug, this is a feature. In documentation, there is
said, that
'On each of these lines, leading * characters are ignored; for lines
other than the first, blanks and tabs preceding the initial *
characters are also discarded.'
This is how a sort of formatting is done. Nevertheless, this formatting
is very weak, so we can get rid of requiring stars before formatted
text.
The diff is following:
Source file : src/share/sun/sun/tools/java/Scanner.java
------- Scanner.java -------
*** /tmp/dtFx1h_ Wed May 5 13:57:55 1999
--- Scanner.java Wed May 5 13:57:38 1999
***************
*** 313,321 ****
case ' ':
case '\t':
! if (seenstar) {
! putc(ch);
! }
ch = in.read();
break;
--- 313,319 ----
case ' ':
case '\t':
! putc(ch);
ch = in.read();
break;
------------------------- end of DIFF
This was taken from the jdk port I have here, it's one of 1.8 ports.
I don't believe it changed a lot, though.
======================================================================
The above suggested fix will not work, consider the case where there
is a leading star - the spaces before it will be included.
robert.field@Eng 2000-02-21
|