mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Add dir="auto" to headings to support RTL languages
This commit is contained in:
parent
4b4a0c2b5b
commit
d5634d6ec2
1 changed files with 11 additions and 2 deletions
13
ast/block.go
13
ast/block.go
|
|
@ -205,8 +205,17 @@ func (n *Heading) Kind() NodeKind {
|
|||
// NewHeading returns a new Heading node.
|
||||
func NewHeading(level int) *Heading {
|
||||
return &Heading{
|
||||
BaseBlock: BaseBlock{},
|
||||
Level: level,
|
||||
BaseBlock: BaseBlock{
|
||||
BaseNode: BaseNode{
|
||||
attributes: []Attribute{
|
||||
{
|
||||
Name: []byte("dir"),
|
||||
Value: []byte("auto"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Level: level,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue