Skip to content

Commit c79a245

Browse files
committed
Add SyntaxSegment.isNewline
1 parent c67fd70 commit c79a245

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Code/Syntax/SyntaxSegment.elm

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ toString (SyntaxSegment _ seg) =
7979

8080

8181

82+
-- HELPERS
83+
84+
85+
isNewline : SyntaxSegment -> Bool
86+
isNewline seg =
87+
case seg of
88+
SyntaxSegment Blank s ->
89+
s == "\n"
90+
91+
_ ->
92+
False
93+
94+
95+
8296
-- VIEW
8397

8498

0 commit comments

Comments
 (0)