TitlePreformatted text doesn't work any more
Date05-Sep-2005 20:31:46 EEST
Bug criticalityJSPWiki:LightBug
Browser versionKonqueror, Firefox 1.04
Bug statusClosedBug
PageProvider usedVersioningFileProvider
Servlet ContainerTomcat 4.1
Operating SystemLinux (SuSE Pro 9.1)
Java version1.4

In a default installation of 2.2.28, preformatted text (marked by three curly braces) is rendered to HTML as follows:

<span style="font-family:monospace; whitespace:pre;">
   ___ __     _    ____
  / __/ / ,__(_)_  \  /    We are GNU
 / (_  ,\/ _/ /_ \  \/   Free your mind
 \__/_/_/_//_/___/  () Free your software

whitespace is not a valid CSS attribute, so this doesn't work. I think it should be "white-space".

Even better would be for it to use <pre> tags, as it does on this site (which is why I can't provide a demo page), but I can't figure out how to do that. I also like the CSS style for <pre> on this site, and wish it was the default on new jspwiki installations.

See src/com/ecyrd/jspwiki/TranslatorReader.java:2886 for the location of the bug.

Cheers, Chris Wilson.

Well, the white-space may be a real bug, but what it does is that if you embed the three curly braces in the middle of a sentence, it approximates <pre> by using a span, but if you put them on their own lines, you get the <pre>. This was a specific request from someone, and it sort of makes sense (of course, there's a small bug in the implementation, see BugInlineUsageOfThreeBraceEscapingBroken.)

-- JanneJalkanen

Fixed in 2.3.81

Hello, my problem is that I have to use JSPWiki and FCK editor. When I insert a preformatted text with ... in wikiwizard there is no problem. but when I open the same article with fck editor and I want to save the article an error occurs: Error message: com.ecyrd.jspwiki.htmltowiki.XHtmlElementToWikiTranslator.access$000(Lcom/ecyrd/jspwiki/htmltowiki/XHtmlElementToWikiTranslator;)Lcom/ecyrd/jspwiki/htmltowiki/WhitespaceTrimWriter; Exception java.lang.NoSuchMethodError Place where detected com.ecyrd.jspwiki.htmltowiki.XHtmlElementToWikiTranslator$PreStack.push(), line 1038 Can anybody help me with this problem? Thx a lot ...

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 03-Jun-2008 17:16 by MantschThomas