A solution for this seems to be to replace the StringTokenizer by BufferedReader(StringReader(event.getMessage())). Do you want me to come up with a patch? Stefan --- Stefan Moebius wrote: > > Another strange thing -- your original task does result in > an > > empty line in the middle in 1.5 if you include the -emacs > command-line > > flag: > > Ok, I had a look a > org.apache.tools.ant.DefaultLogger.messageLogged(): > If -emacs mode is off, a StringTokenizer is used to split the message > into lines. The tokenizer does not return delimiters, which is why > > Some text${line.separator} > > Some more text. > > > does not get you an empty line. Likewise, > > > Some text > ${line.separator} > Some more text. > > > does not print the empty line, because the line contains only > "\n\r\n\r" which is skipped by the tokenizer. On the other hand > > ${line.separator} > > results in " \n\r\n\r" and the tokenizer returns the space (" ") and > you get the empty line. > > In -emacs mode, the message passed to messageLogged() is simply > output. > > Conclusion: > The XML parser does not influence the output of the empty line, the > only thing you need is the whitespace in that line, since most > editors > remove lonely spaces at line ends, you need something to protect the > space that doesn't print. ${line.separator} or do the job. > > Probably a better solution would be to change DefaultLogger to also > print empty lines? > > Stefan > > ===== > Stefan Moebius > Wurzener Str. 43 +49 351 8475827 > 01127 Dresden +49 172 8739617 > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > ===== Stefan Moebius Wurzener Str. 43 +49 351 8475827 01127 Dresden +49 172 8739617 __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: