yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

Quote isn't rendered when put after list item #313

Closed Gusted closed 2 years ago

Gusted commented 2 years ago
  1. What version of goldmark are you using? : v1.4.12
  2. What version of Go are you using? : go1.18.3
  3. What operating system and processor architecture are you using? :linux/amd64
  4. What did you do? : I tried to render 1.\n> This is a quote., via:

    
    import (
        "bytes"
        "fmt"
    
        "github.com/yuin/goldmark"
    )

func main() { md := goldmark.New() var buf bytes.Buffer if err := md.Convert([]byte("1.\n> This is a quote."), &buf); err != nil { panic(err) } fmt.Println(buf.String()) }


6. What did you expect to see? :
```html
<ol>
<li></li>
</ol>
<blockquote>
<p>This is a quote.</p>
</blockquote>
  1. What did you see instead? :

    <ol>
    <li></li>
    </ol>
  2. Did you confirm your output is different from CommonMark online demo or other official renderer correspond with an extension?: Yes, the online demo does correctly render this.

  3. Additional info. If you put two newlines, it will correctly render, but it should also correctly render with one newline:

    -         if err := md.Convert([]byte("1.\n> This is a quote."), &buf); err != nil {
    +         if err := md.Convert([]byte("1.\n\n> This is a quote."), &buf); err != nil {