aboutsummaryrefslogtreecommitdiff
path: root/parser/parser.go
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-01 16:38:49 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-01 16:38:49 +0100
commit1f83fa89d8585b1fa59df7a400157f8df93ff681 (patch)
treedc80afa3ea2f17f76705e7a4b695f41386320845 /parser/parser.go
parenteced3e62c922ee121429759eaa5d4956eb17085d (diff)
Remove the ‘>’ prefixv3.0.0
The rationale was explained on the mailing list[1]. [1]: https://paste.thomasvoss.com/353
Diffstat (limited to 'parser/parser.go')
-rw-r--r--parser/parser.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/parser/parser.go b/parser/parser.go
index b333506..7d69e30 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -32,7 +32,6 @@ type AstNode struct {
Text string
Attrs []Attr
Children []AstNode
- Newline bool
}
// ParseFile reads and parses a GSP-formatted text file and returns a GSP AST.
@@ -73,14 +72,8 @@ func (reader *reader) parseNode() (node AstNode, err error) {
return
}
- switch r {
- case '-', '=':
+ if r == '-' || r == '=' {
return reader.parseText(r == '=')
- case '>':
- node.Newline = true
- if _, err = reader.readRune(); err != nil {
- return
- }
}
if node.Text, err = reader.parseNodeName(); err != nil {