Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Whitespace


PmWiki 2.1.12 makes the CSS property called "white-space" available as a WikiStyle.

Depending on browsers and versions of CSS, the following values may be available as "=arguments"

  • white-space=normal (default)
  • white-space=pre
    • Preformatted: like html <pre> element; no line-wrapping; all spaces, carriage returns, and linefeeds are displayed "as-is" from the source.
  • white-space=pre-wrap
    • Same as pre, except line-wrapping is restored; tabs displayed
    • Introduced in CSS 2.1
  • white-space=-moz-pre-wrap
    • Same as pre, except line-wrapping is restored; tabs displayed
  • white-space=-o-pre-wrap
    • Same as pre, except line-wrapping is restored; tabs displayed as glyph
  • white-space=nowrap
    • Multiple carriage returns and multiple spaces collapsed to a single space

Now to test each of these on PmWiki using the following text:

Line 1 is short.
Line 2 has a 	tab and extra   spaces    between     words.
Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)


Line 8  is preceded by three carriage returns (there is no text on lines 6 and 7)

>>white-space=normal<<

Line 1 is short. Line 2 has a tab and extra spaces between words. Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)

Line 8 is preceded by three carriage returns (there is no text on lines 6 and 7)


>>white-space=pre<<

Line 1 is short. Line 2 has a tab and extra spaces between words. Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)

Line 8 is preceded by three carriage returns (there is no text on lines 6 and 7)


>>white-space=pre-wrap<<

Line 1 is short. Line 2 has a tab and extra spaces between words. Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)

Line 8 is preceded by three carriage returns (there is no text on lines 6 and 7)


>>white-space=-moz-pre-wrap<<

Line 1 is short. Line 2 has a tab and extra spaces between words. Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)

Line 8 is preceded by three carriage returns (there is no text on lines 6 and 7)


>>white-space=-o-pre-wrap<<

Line 1 is short. Line 2 has a tab and extra spaces between words. Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)

Line 8 is preceded by three carriage returns (there is no text on lines 6 and 7)


>>white-space=nowrap<<

Line 1 is short. Line 2 has a tab and extra spaces between words. Line 3 is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line that continue with text because it is a very long line.

Line 5 is preceded by two carriage returns (there is no text on line 4)

Line 8 is preceded by three carriage returns (there is no text on lines 6 and 7)


Observations on an Apple Mac OS X, using the following browsers:

  • Firefox 1.5.0.6
  • iCab b382
  • Netscape 7.1 (because it is so bad)
  • Omniweb 5.1.2
  • Safari 2.0.4

And on an Windows XP using the following browsers:

  • Firefox 1.5.0.4
  • Internet Explorer 6.0.2800.1106
  • Netscape 7.1

>>white-space=pre<<

  • works on all browsers tested
    • But two and three carriage returns look the same

>>white-space=pre-wrap<<

  • works on iCab

>>white-space=-moz-pre-wrap<<

  • Works on Firefox (Mac & PC) and Netscape (Mac & PC)
Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
 0: 00.00 00.00 config start
 1: 00.01 00.00 config end
 2: 00.05 00.05 MarkupToHTML begin
 3: 00.14 00.14 MarkupToHTML end
 4: 00.15 00.14 MarkupToHTML begin
 5: 00.17 00.17 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 6: 00.19 00.18 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 7: 00.20 00.19 MarkupToHTML end
 8: 00.20 00.19 MarkupToHTML begin
 9: 00.22 00.20 MarkupToHTML end
10: 00.22 00.21 now