#4423 Wiki translates carriage-returns in markdown to breaks in html [26285]

v1.0.0
closed
General
2015-08-20
2012-06-20
Chris Tsai
No

https://sourceforge.net/apps/trac/sourceforge/ticket/26285

e.g., the markdown:

One
Two
Three

Output the html:

<p>One<br />Two<br />Three</p>

Instead of the expected:

<p>One Two Three</p>

According to the wiki documentation at https://sourceforge.net/p/forge/documentation/Wiki/, the wiki markdown is as specified at http://daringfireball.net/projects/markdown/syntax, except for the noted exceptions.

One of the features of markdown is that it supports 'hard-wrapped' text paragraphs. (See "PARAGRAPHS AND LINE BREAKS" at http://daringfireball.net/projects/markdown/syntax ). I.e., the plain-text paragraphs may have hard carriage returns to keep each line under 80 characters, but the output html does not insert breaks.

This does not seem to be the behavior of (Beta-style) wiki.

This is particularly a problem for using an external editor (emacs), and when copying and pasting back and forth between plaintext documentation and wiki pages.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-06-29
    • milestone: limbo --> forge-jul-13
     
  • Dave Brondsema

    Dave Brondsema - 2012-06-29
    • size: --> 1
     
  • Dave Brondsema

    Dave Brondsema - 2012-06-29

    This is intentional, but we need to document it better. The "text" section example is confusing.

     
  • Anonymous - 2012-06-29

    Originally by: jnewsome

    Why is that? Any chance of reconsidering? Why would anyone want this behavior outside of pre-formatted blocks?

    I suppose for small snippets of markdown such as comments and issues its ok, since people will just not insert carriage returns unless they want them.

    It can be troublesome for things like wiki pages and in-repository markdown files though (which currently follow the standard markdown behavior, but I guess that would stop if you switch to the Allura processor cf [tickets:#4474]). For those it can be useful to use an external editor, many of which use hard-returns inside paragraphs.

    For markdown files under version control, these kind of 'hard-wrapped' paragraphs are also much friendlier to diffs, patches, etc.

     

    Related

    Tickets: #4474

  • Jenny Steele - 2012-07-06
    • status: open --> in-progress
    • assigned_to: Jenny Steele
     
  • Jenny Steele - 2012-07-09
    • status: in-progress --> code-review
    • qa: Tim Van Steenburgh
     
  • Jenny Steele - 2012-07-09

    Changed docs to clarify this on allura js/4423.

     
    • status: code-review --> closed
     

Log in to post a comment.