[X] goldmark is fully compliant with the CommonMark. Before submitting issue, you must read CommonMark spec and confirm your output is different from CommonMark online demo.
[X] Extensions(Autolink without <>, Table, etc) are not part of CommonMark spec. You should confirm your output is different from other official renderers correspond with an extension.
[X] goldmark is not dedicated for Hugo. If you are Hugo user and your issue was raised by your experience in Hugo, you should consider create issue at Hugo repository at first .
Please answer the following before submitting your issue:
What version of goldmark are you using? : 1.5.4
What version of Go are you using? : 1.20.1
What operating system and processor architecture are you using? : Mac
What did you do? : ran the below code
What did you expect to see? : it should add softbreak
What did you see instead? : not adding softbreak
Did you confirm your output is different from CommonMark online demo or other official renderer correspond with an extension?: yes
package main
import (
"fmt"
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/ast"
"github.com/yuin/goldmark/text"
)
var source = `
**2. Click "Rankings Distribution"
Click "Landscape"
Click "SEO Dashboard
COMPETITIVE RESEARCH
Domain Overview
Traffic Analytics
Organic Research
Keyword Gap
Backlink Gap
KEYWORD RESEARCH
Keyword Overview..."**
`
func main() {
doc := goldmark.DefaultParser().Parse(text.NewReader([]byte(source)))
ast.Walk(doc, func(n ast.Node, entering bool) (ast.WalkStatus, error) {
s := ast.WalkStatus(ast.WalkContinue)
var err error
fmt.Println(n.Kind(), entering, string(n.Text([]byte(source))))
return s, err
})
}
Outputs
............
Text true 2. Click "Rankings Distribution"
Text false 2. Click "Rankings Distribution"
Text true Click "Landscape"
Text false Click "Landscape"
Text true Click "SEO Dashboard
Text false Click "SEO Dashboard
Text true COMPETITIVE RESEARCH
Text false COMPETITIVE RESEARCH
Text true Domain Overview
Text false Domain Overview
Text true Traffic Analytics
Text false Traffic Analytics
Text true Organic Research
Text false Organic Research
....
goldmark has https://github.com/yuin/goldmark/discussions in github. You should post only issues here. Feature requests and questions should be posted at discussions.
<
>
, Table, etc) are not part of CommonMark spec. You should confirm your output is different from other official renderers correspond with an extension.Please answer the following before submitting your issue:
Outputs
It should add the softbreak between lines print like this according to https://spec.commonmark.org/dingus/