CommonMark indented code blocks (lines starting with four spaces) are not recognized by pampa's parser. The indented content is parsed as a series of Para blocks (with the indentation stripped), so lines like - A and - B become Para [Str "-", Space, Str "A"] and Para [Str "-", Space, Str "B"]. The writer then emits each paragraph at column 0, producing - A\n\n- B, which the reader on the round trip recognises as a real BulletList.
$ printf 'Before.\n\n categories:\n - A\n - B\n\nAfter.\n'
Before.
categories:
- A
- B
After.
$ printf 'Before.\n\n categories:\n - A\n - B\n\nAfter.\n' | cargo run --bin pampa --
[ Para [Str "Before."], Para [Str "categories:"], Para [Str "-", Space, Str "A"], Para [Str "-", Space, Str "B"], Para [Str "After."] ]
$ printf 'Before.\n\n categories:\n - A\n - B\n\nAfter.\n' | cargo run --bin pampa -- -t qmd
Before.
categories:
- A
- B
After.
$ printf 'Before.\n\n categories:\n - A\n - B\n\nAfter.\n' | cargo run --bin pampa -- -t qmd | cargo run --bin pampa --
[ Para [Str "Before."], Para [Str "categories:"], BulletList [[Para [Str "A"]], [Para [Str "B"]]], Para [Str "After."] ]
CommonMark indented code blocks (lines starting with four spaces) are not recognized by pampa's parser. The indented content is parsed as a series of
Parablocks (with the indentation stripped), so lines like- Aand- BbecomePara [Str "-", Space, Str "A"]andPara [Str "-", Space, Str "B"]. The writer then emits each paragraph at column 0, producing- A\n\n- B, which the reader on the round trip recognises as a realBulletList.From quarto-web: