# \[Markdown Pkg\] Issues with parsing of nested list

**URL:** <https://discourse.julialang.org/t/markdown-pkg-issues-with-parsing-of-nested-list/85211>\
**Category:** General Usage\
**Tags:** markdown\
**Created:** [August 3, 2022, 1:58am UTC](https://discourse.julialang.org/t/markdown-pkg-issues-with-parsing-of-nested-list/85211 "2022-08-03T01:58:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)\
**Post date:** [August 3, 2022, 1:58am UTC](https://discourse.julialang.org/t/markdown-pkg-issues-with-parsing-of-nested-list/85211/1 "2022-08-03T01:58:05Z")

</div>

I need to parse a very simple nested list with julia markdown, but can’t get it correctly.

The doc states to insert some newline. It works upto level 2, but it does not seem to work at depth 3 and more.

LIST THAT BUGS PARSING

```julia
- a
    - aa
        - aaa
        - aab
        - aac

```

and

```julia
- a
    - aa

        - aaa
        - aab
        - aac

```

and

```julia
- a
    - aa

        - aaa

        - aab

        - aac

```

and

```julia
- a

    - aa

        - aaa
        - aab
        - aac

```

and

```julia
- a

    - aa

        - aaa

        - aab

        - aac

```

and

```julia
- a
    - aa

        - aaa

        - aab
        - aac

```

and

```julia
- a

    - aa

        - aaa

        - aab
        - aac

    - ab

        - aba
        - abb
        - abc

    - ac

```

and

```julia
- a

    - aa

        - aaa
        - aab
        - aac

    - ab

        - aba
        - abb
        - abc

    - ac

```

and

```julia

- a
    - aa
        - aaa
        - aab
        - aac
    - ab
        - aba
        - abb
        - abc
    - ac

```

and

```julia

- a
    - aa

        - aaa
        - aab
        - aac

    - ab

        - aba
        - abb
        - abc

    - ac

```

All of these return only list of depth 2  
How to fix that and get a correct list of depth 3 ?

The newline trick is very hard to get correctly

LIST PARSING CORRECTLY

```julia
- a

    - aa
    - ab
    - ac

- b
- c

```

and

```julia
- a
    - aa
    - ab
    - ac
- b
- c

```

and

```julia
- a
    - aa
    - ab
    - ac
- b
    - ba
    - bb
    - bc
- c

```

and

```julia
- a
    - aa
    - ab
    - ac

- b
    - ba
    - bb
    - bc

- c

```

SEE

- [Markdown · The Julia Language](https://docs.julialang.org/en/v1/stdlib/Markdown/)
- [[Markdown] Nested bulleted lists don't work in Julia Markdown · Issue #16003 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/16003) fixed in 2016 ? or not ?

---

<div class="post-metadata">

**Author:** ![icweaver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/icweaver/32/45764_2.png) [@icweaver](https://discourse.julialang.org/u/icweaver)\
**Post date:** [August 3, 2022, 3:57am UTC](https://discourse.julialang.org/t/markdown-pkg-issues-with-parsing-of-nested-list/85211/2 "2022-08-03T03:57:04Z")

</div>

IIUC the markdown spec followed in [CommonMark.jl](https://github.com/MichaelHatherly/CommonMark.jl) is more robust and may potentially [replace Markdown.jl](https://github.com/JuliaLang/julia/issues/37337) as the default in the stdlib one day. So I would probably just use that instead:

```julia
julia> using CommonMark

julia> cm"""
       - a
           - aa
               - aaa
               - aab
               - aac
       """
  ● a
    
     ○ aa
       
        ▶ aaa
        
        ▶ aab
        
        ▶ aac

```

---

<div class="post-metadata">

**Author:** ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)\
**Post date:** [August 3, 2022, 5:12am UTC](https://discourse.julialang.org/t/markdown-pkg-issues-with-parsing-of-nested-list/85211/3 "2022-08-03T05:12:03Z")

</div>

Thanks. There is also `cmark.jl`

`Cmark` less than 0.7 KSLOC will have my preference over a [`one day`](https://github.com/fonsp/Pluto.jl/issues/957) big bang solution.  
But it is even not released on juliahub and seems to be less supported.

There is not enough attention given to quality , it is getting worse too fast by now

EDIT  
The match between pkg rank and ressource allocation remains too much a job of academician doing business today. That hurts too often . Hoping that news will help

 ![Capture1](https://global.discourse-cdn.com/julialang/original/3X/6/4/647001ff40834a65f8170c87729472a8401b19be.jpeg)  
 ![Capture2](https://global.discourse-cdn.com/julialang/original/3X/2/7/27c3f59d49bc7d6c93316654d7c4cb009d4a3b52.jpeg)
