(anonymous guest) (logged out)

Copyright (C) by the contributors. Some rights reserved, license BY-SA.

Sponsored by the Wiki Symposium and the Nuveon GmbH.

 
This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Please see: Vote for Line Breaks


There is a proposal on Talk.Line breaks to change the line break markup from the "blog-like" one to the "wiki-like" approach.

Change now part of official Creole 0.4 proposal.

Current Approach#

requested to be changed, taken from Creole 0.3

Treat line breaks as line breaks. Best practice: line continuations made with backslash at end of line. This rule is optional If implementing a mixed native/creole mode.

Creole:

This is the first line.
This is the second line.

Recommended XHTML:

<p>
This is the first line.<br />
This is the second line.
</p>

Sample Output:

This is the first line.
This is the second line.

Blog-like#

The current approach to line breaks is as follows:

  • line breaks inside paragraphs are treated as line breaks (html <BR> tag), except for the last one, that is skipped
  • line breaks inside preformatted text blocks are treated as line breaks ("\n" in the html output)
  • line breaks inside list items and table cells are not allowed

Advantages#

  • WYSIWYG
  • compatible with some blogging software and forums
  • obvious way to manually format text (EasyToLearn)
  • that's how Microsoft Word does it (hey, countries amended their languages to be compatible with Word)
  • doesn't require a change in the current spec

Disadvantages#

  • conflicts with the default rules of 99% wiki engines, making mixed mode impossible
  • incompatible with the wiki software
  • manually formatted text can't be reformatted automatically
  • a chanage of the width of the text results in broken formatting
  • text pasted from e-mails or other sources must be reformatted
  • single line breaks are InvisibleMarkup
  • hard to parse with regular expressions
  • inconsistent (text is treated differently in paragraphs and in list items)

Wiki-like#

  • line breaks inside preformatted text block are treated as line breaks ("\n" in the html output)
  • all other line breaks are treated as spaces (also "\n" in the html output)
  • additional markup for forcing line break (the html <BR> tag)
  • forced line break can be used inside list items, table cells, headings, etc.

Advantages#

  • consistent with thedefault ruels of 99% wiki engines, making mixed mode possible
  • used by majority of wiki engines (NotNew)
  • used in professional typesetting software and in many markup languages (NotNew)
  • consistent (new lines are treated the same everywhere, except for the pre blocks -- but that's their function)
  • easy to parse, compatible with HTML
  • can be automatically reformatted
  • can be displayed with any text width, any font on any device
  • makes the most common task easy and the rare ones possible (by using the forced newline)
  • first step to learning more advanced text processing systems
  • forces to use list markup for lists, heading markup for headings, etc.

Disadvantages#

  • not obvious for computer illiterates
  • requires additional markup in addresses and poetry
  • extends the specification with additional markup for forced line breaks
  • requires a change in the current spec

Add new attachment

Only authorized users are allowed to upload new attachments.

« This particular version was published on 22-Jan-2007 16:09 by ChuckSmith.