mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Add dire="auto" attribute to paragraphs to support RTL languages
This commit is contained in:
parent
8c219a7562
commit
4b4a0c2b5b
1 changed files with 10 additions and 1 deletions
11
ast/block.go
11
ast/block.go
|
|
@ -158,7 +158,16 @@ func (n *Paragraph) Kind() NodeKind {
|
|||
// NewParagraph returns a new Paragraph node.
|
||||
func NewParagraph() *Paragraph {
|
||||
return &Paragraph{
|
||||
BaseBlock: BaseBlock{},
|
||||
BaseBlock: BaseBlock{
|
||||
BaseNode: BaseNode{
|
||||
attributes: []Attribute{
|
||||
{
|
||||
Name: []byte("dir"),
|
||||
Value: []byte("auto"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue