Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List bugs in Markdown parser #22076

Open
KristofferC opened this issue May 26, 2017 · 1 comment
Open

List bugs in Markdown parser #22076

KristofferC opened this issue May 26, 2017 · 1 comment
Labels
docsystem The documentation building system stdlib:markdown stdlib Julia's standard library

Comments

@KristofferC
Copy link
Sponsor Member

KristofferC commented May 26, 2017

Changing the list type should give separate lists:

julia> typeof.(Markdown.parse(
       """
       * foo
       + bar
       """).content)
1-element Array{DataType,1}:
 Base.Markdown.List

Spaces on an empty line between list items breaks a list in two:

julia> typeof.(Markdown.parse("  * dsadsa\n\n  * dsadas\n").content)
1-element Array{DataType,1}:
 Base.Markdown.List

julia> typeof.(Markdown.parse("  * dsadsa\n  \n  * dsadas\n").content)
2-element Array{DataType,1}:
 Base.Markdown.List
 Base.Markdown.List
@KristofferC KristofferC changed the title List bugs Markdown parser List bugs in Markdown parser May 26, 2017
@JeffBezanson JeffBezanson added the docsystem The documentation building system label Jun 1, 2017
@jpfairbanks
Copy link
Contributor

Here is another one JuliaDocs/Documenter.jl#900:

julia> using Markdown
¨
julia> s = """
       ---
       abstract: |
           This is the abstract
       author:
       - |
           Document Authors
       date: 'Dec 1, 2018'
       title: |
         The Title
       ---
       """;

julia> Markdown.parse(s)
ERROR: BoundsError: attempt to access 0-element Array{SubString{String},1} at index [1]
Stacktrace:
 [1] getindex at ./array.jl:731 [inlined]
 [2] (::getfield(Markdown, Symbol("##55#57")){Base.GenericIOBuffer{Array{UInt8,1}},Markdown.MD})() at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Markdown/src/GitHub/table.jl:48

@fredrikekre fredrikekre added stdlib:markdown stdlib Julia's standard library labels Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system stdlib:markdown stdlib Julia's standard library
Projects
None yet
Development

No branches or pull requests

4 participants