Remove all remaining validator_regexp
This commit is contained in:
parent
373bd83640
commit
ecb815666e
@ -797,7 +797,7 @@ type uploadedFlag struct {
|
|||||||
IgnoreCase bool
|
IgnoreCase bool
|
||||||
Multiline bool
|
Multiline bool
|
||||||
NoTrim bool
|
NoTrim bool
|
||||||
CaptureRe *string `json:"validator_regexp"`
|
CaptureRe *string `json:"capture_regexp"`
|
||||||
SortReGroups bool `json:"sort_re_grps"`
|
SortReGroups bool `json:"sort_re_grps"`
|
||||||
Flag string
|
Flag string
|
||||||
Value []byte
|
Value []byte
|
||||||
|
@ -32,8 +32,8 @@ function treatFlagKey(flag) {
|
|||||||
if (flag.value && flag.soluce) {
|
if (flag.value && flag.soluce) {
|
||||||
if (flag.ignore_case)
|
if (flag.ignore_case)
|
||||||
flag.value = flag.value.toLowerCase();
|
flag.value = flag.value.toLowerCase();
|
||||||
if (flag.validator_regexp) {
|
if (flag.capture_regexp) {
|
||||||
var re = new RegExp(flag.validator_regexp, flag.ignore_case?'ui':'u');
|
var re = new RegExp(flag.capture_regexp, flag.ignore_case?'ui':'u');
|
||||||
var match = re.exec(flag.value);
|
var match = re.exec(flag.value);
|
||||||
match.shift();
|
match.shift();
|
||||||
flag.value = match.join("+");
|
flag.value = match.join("+");
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
<input type="text" id="kflag{{flag.id}}" ng-model="flag.flag" class="form-control form-control-sm" placeholder="Chaîne brute à valider" ng-if="!flag.id || flag.show_raw" title="Chaîne brute à valider">
|
<input type="text" id="kflag{{flag.id}}" ng-model="flag.flag" class="form-control form-control-sm" placeholder="Chaîne brute à valider" ng-if="!flag.id || flag.show_raw" title="Chaîne brute à valider">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="kvre{{flag.id}}" class="col-form-label-sm">Validator regexp</label>
|
<label for="kvre{{flag.id}}" class="col-form-label-sm">Capture regexp</label>
|
||||||
<input type="text" id="kvre{{flag.id}}" ng-model="flag.validator_regexp" class="form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
<input type="text" id="kvre{{flag.id}}" ng-model="flag.capture_regexp" class="form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-auto custom-control custom-checkbox ml-1">
|
<div class="col-auto custom-control custom-checkbox ml-1">
|
||||||
|
@ -211,7 +211,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<input type="text" id="kvre{{flag.id}}" ng-model="flag.validator_regexp" class="col form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
<input type="text" id="kvre{{flag.id}}" ng-model="flag.capture_regexp" class="col form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form ng-submit="testFlag(flag)">
|
<form ng-submit="testFlag(flag)">
|
||||||
|
@ -52,8 +52,8 @@
|
|||||||
soluce = soluce.toLowerCase();
|
soluce = soluce.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag.validator_regexp) {
|
if (flag.capture_regexp) {
|
||||||
let re = new RegExp(flag.validator_regexp, flag.ignore_case?'i':'');
|
let re = new RegExp(flag.capture_regexp, flag.ignore_case?'i':'');
|
||||||
soluce = soluce.match(re).slice(1).join("+");
|
soluce = soluce.match(re).slice(1).join("+");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ type myTeamFlag struct {
|
|||||||
IgnoreOrder bool `json:"ignore_order,omitempty"`
|
IgnoreOrder bool `json:"ignore_order,omitempty"`
|
||||||
IgnoreCase bool `json:"ignore_case,omitempty"`
|
IgnoreCase bool `json:"ignore_case,omitempty"`
|
||||||
Multiline bool `json:"multiline,omitempty"`
|
Multiline bool `json:"multiline,omitempty"`
|
||||||
CaptureRe *string `json:"validator_regexp,omitempty"`
|
CaptureRe *string `json:"capture_regexp,omitempty"`
|
||||||
Solved *time.Time `json:"found,omitempty"`
|
Solved *time.Time `json:"found,omitempty"`
|
||||||
PSolved *time.Time `json:"part_solved,omitempty"`
|
PSolved *time.Time `json:"part_solved,omitempty"`
|
||||||
Soluce string `json:"soluce,omitempty"`
|
Soluce string `json:"soluce,omitempty"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user