Skip to content
Extraits de code Groupes Projets
Valider 45ed4104 rédigé par Adrien NUNES's avatar Adrien NUNES
Parcourir les fichiers

Fix

parent 397bc536
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -11,6 +11,7 @@ const actionRE = new RegExp('<action>', 'gi');
const MAX_ITERATIONS = 10;
function fillAllRandomObject(sentence, regularExpr, category){
const matches = sentence.matchAll(regularExpr);
let objectString = "";
let newSentence = sentence;
......@@ -23,12 +24,11 @@ function fillAllRandomObject(sentence, regularExpr, category){
}
function shouldBeFilled(sentence) {
return [actorRE, reasonRE, sourceRE, actionRE].some((re) =>{
const b = re.test(sentence)
if(b){
const matches = sentence.matchAll(re);
for(let match of matches) console.log(match);
}
const result = re.test(sentence)
re.lastIndex = 0;
return result;
});
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter