~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH hautils v2] nl: update for regex::find

Details
Message ID
<20230210182404.2291199-1-b@torresjrjr.com>
DKIM signature
pass
Download raw message
Patch: +2 -3
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
Details
Message ID
<CR7OQS0Z6UGZ.N6XH0NX44DQW@taiga>
In-Reply-To
<20230210182404.2291199-1-b@torresjrjr.com> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/hautils
   51d5cdd..0d31e3a  master -> master
Reply to thread Export thread (mbox)