Markdown List Problem

Nash Kabbara's Avatar

Nash Kabbara

06 Jun, 2009 06:19 PM

Hi,

Doer you formatter handle having lists with multiple paragraphs?

According to http://daringfireball.net/projects/markdown/syntax#list it's possible to create lists with multiple paragraphs, but when I try it here, I get a code block for the second paragraph.

Thanks.

-Nash

  1. 1 Posted by Kyle Neath (Git... on 06 Jun, 2009 08:42 PM

    Kyle Neath (GitHub Staff) 's Avatar

    Can you give us an example of what you mean exactly? We're using a modified version of Markdown (for example, you don't need two spaces for a new line here), but lists should work just like regular markdown.

    Thanks!

  2. 2 Posted by Nash Kabbara on 06 Jun, 2009 08:53 PM

    Nash Kabbara's Avatar

    Kyle,

      This is the exact example I'm talking about from:
    http://daringfireball.net/projects/markdown/syntax#list

    -----------------------------------------------
    List items may consist of multiple paragraphs. Each subsequent paragraph in a
    list item must be indented by either 4 spaces or one tab:

    1. This is a list item with two paragraphs. Lorem ipsum dolor
        sit amet, consectetuer adipiscing elit. Aliquam hendrerit
        mi posuere lectus.

        Vestibulum enim wisi, viverra nec, fringilla in, laoreet
        vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
        sit amet velit.

    2. Suspendisse id sem consectetuer libero luctus adipiscing.

    It looks nice if you indent every line of the subsequent paragraphs, but here
    again, Markdown will allow you to be lazy:

    * This is a list item with two paragraphs.

        This is the second paragraph in the list item. You're
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.

    * Another item in the same list.
    ---------------------------------------------------

    Thanks.

    -Nash

  3. 3 Posted by Kyle Neath (Git... on 08 Jun, 2009 05:47 PM

    Kyle Neath (GitHub Staff) 's Avatar

    Thanks for the example. We may or may not implement this edge case... we do a lot of special processing to make it a bit easier on regular users, so we end up cutting off some of the more advanced features now and then. I'll be sure to update our "Help with Syntax" sentences to outline the limitations.

  4. Kyle Neath (GitHub Staff) closed this discussion on 08 Jun, 2009 05:47 PM.

  5. Nash Kabbara re-opened this discussion on 08 Jun, 2009 06:32 PM

  6. 4 Posted by Nash Kabbara on 08 Jun, 2009 06:32 PM

    Nash Kabbara's Avatar

    I see.

    The reason that this was needed for us is because we're trying to have a list
    of steps to demonstrate to our users how to activate a feature. Each step has
    a photo associated with it.

    Doing a regular <ol> list is causing the photos to get aligned in a weird
    location so we were trying to put the photos in their own paragraph for each
    li. So <li><p>step text</p><p>step photo</p></li>.

    Maybe this is something regular users would use a lot?

    Why do you guys implement your own markdown parser? There the latest gem out
    there that does a pretty good job. Markdown 2.

    Thanks.

    -Nash

  7. 5 Posted by rick on 10 Jun, 2009 07:42 PM

    rick's Avatar

    Regular users actually don't use much of markdown. We use the discount library for markdown, but do our own processing to make things easier on people. Most people don't know you need two spaces at the end of a line to generate just a single linebreak, for instance. They'd also like to paste big blocks of preformatted text without add pre/code html tags.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac