Added rich.Empty
This commit adds rich.Empty for convenience. It describes an empty text segment.
This commit is contained in:
parent
cd018ef8f9
commit
4239dc47c4
|
@ -7,6 +7,9 @@ type Rich struct {
|
|||
Segments []Segment
|
||||
}
|
||||
|
||||
// Empty describes an empty rich text segment with no formatting.
|
||||
var Empty = Rich{}
|
||||
|
||||
// Plain creates a rich text with no formatting.
|
||||
func Plain(text string) Rich {
|
||||
return Rich{Content: text}
|
||||
|
|
Loading…
Reference in New Issue