From 160b2f9215e518b0a1db418f4eca08ef969ef3cf Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Wed, 20 Nov 2024 01:04:01 -0500 Subject: [PATCH] Added newline character as an escaped node --- postfixNode.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postfixNode.go b/postfixNode.go index c6c1808..3aea8b8 100644 --- a/postfixNode.go +++ b/postfixNode.go @@ -62,6 +62,9 @@ func newEscapedNode(c rune) postfixNode { case 'b', 'B': toReturn.nodetype = ASSERTION toReturn.contents = append(toReturn.contents, c) + case 'n': // Newline character + toReturn.nodetype = CHARACTER + toReturn.contents = append(toReturn.contents, '\n') default: // None of the above - append it as a regular character toReturn.nodetype = CHARACTER toReturn.contents = append(toReturn.contents, c)