Signed-off-by: Byron Torres <b@torresjrjr.com>
---
# v2
signoff
nl.ha | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/nl.ha b/nl.ha
index e5d936a..00496cc 100644
--- a/nl.ha
+++ b/nl.ha
@@ -331,11 +331,10 @@ fn println(line: str, s: style, ctx: *context) (void | io::error) = {
case none =>
fmt::printf("{%}{}", " ", ctx.mod, ctx.sepblank)?;
case let re: regex::regex =>
- match (regex::find(&re, line)) {
- case []regex::capture =>
+ if (len(regex::find(&re, line)) > 0) {
fmt::printf("{%}{}", ctx.linenum, ctx.mod, ctx.sep)?;
ctx.linenum += ctx.incr;
- case void =>
+ } else {
fmt::printf("{%}{}", " ", ctx.mod, ctx.sepblank)?;
};
};
--
2.39.1