We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7658fd1 commit 05d595fCopy full SHA for 05d595f
src/JbeamEdit/Formatting.hs
@@ -128,11 +128,10 @@ applyIndentation n s
128
| otherwise = T.replicate n " " <> s
129
130
skipHeaderRow :: Vector (Vector Node) -> Vector (Vector Node)
131
-skipHeaderRow nodes =
132
- case V.uncons nodes of
133
- Just (headerRow, rest) ->
134
- bool nodes rest (all isStringNode headerRow)
135
- Nothing -> nodes
+skipHeaderRow nodes
+ | V.length nodes > 1 =
+ bool nodes (V.unsafeTail nodes) (V.all isStringNode $ V.unsafeHead nodes)
+ | otherwise = nodes
136
137
maxColumnLengths
138
:: RuleSet -> NC.NodeCursor -> Vector (Vector Node) -> Vector Int
0 commit comments