durable_rules 0.34.34 → 0.34.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/rules/regex.c +6 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4dac8eb12717b1ab1df781c340385dd775089e2
|
4
|
+
data.tar.gz: 203c76635664dfbcabac912ac74093c3a0b5677a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f2c2d3e579ad6d486a4c71879baafb6879260c88b80652600c7de7f061fbdb8c4491e2a4facc9331b16709b2de737893a7f0cc95921bd411a56d3a1e5d9ea9f
|
7
|
+
data.tar.gz: c22086988ac401f2f2a3502dac8151d63e5c02128108325dc4e01b3ec9a4427b9edc67aadff855d8a580a7cee62de0e462c7ff43e0c03811fc0a6f21b8fcb720
|
data/src/rules/regex.c
CHANGED
@@ -900,7 +900,7 @@ static unsigned int ensureState(unsigned short *id,
|
|
900
900
|
unsigned short stateListLength,
|
901
901
|
state **newState) {
|
902
902
|
CREATE_STATE(id, newState);
|
903
|
-
unsigned short
|
903
|
+
unsigned short cancelSpecificTransitions = 0;
|
904
904
|
for (unsigned short i = 0; i < stateListLength; ++i) {
|
905
905
|
state *targetState = list[i];
|
906
906
|
for (unsigned short ii = 0; ii < targetState->transitionsLength; ++ii) {
|
@@ -910,8 +910,8 @@ static unsigned int ensureState(unsigned short *id,
|
|
910
910
|
return result;
|
911
911
|
}
|
912
912
|
|
913
|
-
if (targetTransition->symbol == REGEX_DOT) {
|
914
|
-
|
913
|
+
if (targetTransition->symbol == REGEX_DOT && targetState->isAccept) {
|
914
|
+
cancelSpecificTransitions = 1;
|
915
915
|
}
|
916
916
|
}
|
917
917
|
|
@@ -928,10 +928,9 @@ static unsigned int ensureState(unsigned short *id,
|
|
928
928
|
}
|
929
929
|
}
|
930
930
|
|
931
|
-
//
|
932
|
-
// all specific transitions are cancelled, this allows for the
|
933
|
-
|
934
|
-
if (dotTransitions > 1) {
|
931
|
+
// if the current state has any dot transitions to accept states
|
932
|
+
// then all specific transitions are cancelled, this allows for the first match to succeed.
|
933
|
+
if (cancelSpecificTransitions) {
|
935
934
|
for (unsigned short i = 0; i < (*newState)->transitionsLength; ++i) {
|
936
935
|
transition *currentTransition = &(*newState)->transitions[i];
|
937
936
|
if (currentTransition->symbol != REGEX_DOT) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: durable_rules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.34.
|
4
|
+
version: 0.34.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesus Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|