quote interpreted string

This commit is contained in:
Dai Zuozhuo
2015-11-12 15:34:55 +08:00
parent 742243bb4a
commit ad5cc8b599
5 changed files with 23 additions and 19 deletions

View File

@@ -84,11 +84,11 @@ func (l *ListNode) String() string {
// TextNode holds plain text.
type TextNode struct {
NodeType
Text []byte // The text; may span newlines.
Text string // The text; may span newlines.
}
func newText(text string) *TextNode {
return &TextNode{NodeType: NodeText, Text: []byte(text)}
return &TextNode{NodeType: NodeText, Text: text}
}
func (t *TextNode) String() string {