Skip to content

Markdown parsing of newlines in bulleted list #30198

@kescobo

Description

@kescobo

Often, one wants to add new lines in the plain text that are not rendered as new lines in html. Documenter seems to treat these differently than other markdown renderers. For example:

# Test Doc

- A bullet
- Long bullet text **not**
    wrapped to new line
- Long bullet text
wrapped to new line

In the markdown formatters I'm familiar with, the 2nd and third bullets are rendered the same - the 4 spaces in the second bullet don't change anything. Eg, in Atom's markdown preview:

screen shot 2018-11-29 at 9 40 49 am

But julia treats them differently (noticed in Documenter):

screen shot 2018-11-29 at 9 41 03 am

MWE (thanks to @KristofferC - see here) :

julia> using Markdown

julia> md = Markdown.parse("""
       - Long bullet text
       wrapped to new line
       """);

julia> md.content
2-element Array{Any,1}:
 Markdown.List(Any[Any[Paragraph(Any["Long bullet text"])]], -1, false)
 Markdown.Paragraph(Any["wrapped to new line"])                        

julia> md
    •    Long bullet text

  wrapped to new line

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions