Introduction
Introduction Statistics Contact Development Disclaimer Help
tregex: no new line in \1 of "(.*)$" when NOTEOL - neatvi - [fork] simple vi-ty…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit 89738c4b7ea3a3d705c408090a85c14610158251
parent a7f36bdd3399c064e74f712a09f66ae464b4c192
Author: Ali Gholami Rudi <[email protected]>
Date: Fri, 3 Feb 2017 11:46:12 +0330
regex: no new line in \1 of "(.*)$" when NOTEOL
Diffstat:
M regex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/regex.c b/regex.c
t@@ -278,14 +278,14 @@ static int ratom_match(struct ratom *ra, struct rstate *…
return 0;
}
if (ra->ra == RA_ANY) {
- if (!rs->s[0])
+ if (!rs->s[0] || (rs->s[0] == '\n' && !(rs->flg & REG_NOTEOL)))
return 1;
rs->s += uc_len(rs->s);
return 0;
}
if (ra->ra == RA_BRK) {
int c = uc_dec(rs->s);
- if (!c)
+ if (!c || (c == '\n' && !(rs->flg & REG_NOTEOL)))
return 1;
rs->s += uc_len(rs->s);
return brk_match(ra->s + 1, c, rs->flg);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.