step5m(word) { let result = word; const match = /^(.+?)(ουμε|ησουμε|ηθουμε)$/.exec(result); if (match) { [, result] = match; if (/^(παρασουσ|φ|χ|ωριοπλ|αζ|αλλοσουσ|ασουσ)$/.test(result)) { result += 'ουμ'; } } return result; }
forEachLine(lineMetadata(), function (line, lineIndex, inCode) { if (!inCode && /^#+[^#\s]/.test(line) && !/#\s*$/.test(line) && !line.startsWith("#️⃣")) { var hashCount = /^#+/.exec(line)[0].length; addErrorContext(onError, lineIndex + 1, line.trim(), null, null, [1, hashCount + 1], { "editColumn": hashCount + 1, "insertText": " " }); } });
ExtractAssignedId(parseTree) { let idAssignment = parseTree.qnaDefinition().qnaIdMark() if (idAssignment) { let idTextRegExp = /^\<a[ ]*id[ ]*=[ ]*[\"\'](?<idCaptured>.*?)[\"\'][ ]*>[ ]*\<\/a\>$/gmi; let idTextParsed = idTextRegExp.exec(idAssignment.getText().trim()); return idTextParsed.groups.idCaptured || undefined; } return undefined; }
test('webpack import resolver is used if webpack.config.js is found', async t => { const cwd = 'fixtures/webpack/with-config/'; const {results} = await fn.lintFiles(path.resolve(cwd, 'file1.js'), { cwd, rules: { 'import/no-unresolved': 2 } }); t.is(results[0].errorCount, 1); const errorMessage = results[0].messages[0].message; t.truthy(/Unable to resolve path to module 'inexistent'/.exec(errorMessage)); });
ExtractAnswer(parseTree) { let multiLineAnswer = parseTree.qnaDefinition().qnaAnswerBody().multiLineAnswer().getText().trim(); // trim first and last line let answerRegexp = /^```(markdown)?\r*\n(?<answer>(.|\n|\r\n|\t| )*)\r?\n.*?```$/gim; let answer = answerRegexp.exec(multiLineAnswer); return answer.groups.answer !== undefined ? answer.groups.answer : ''; }
/* * Helper to cleanse path */ const cleanLine = (line = '') => { const m = /.*\((.*)\).?/.exec(line) || []; return m[1] ? line.replace(m[1], _.last(m[1].split(path.sep))) : line; }
transformToSafeString(input) { if (/^[\d]/g.exec(input)) { return `model${input}`; } // NOTICE: add dash to get proper snake/pascal case if (this.isReservedWord(input)) { return `model${_.upperFirst(input)}`; } return input; }
/** * @desc Return the function name from a JS function string * @param {String} funcStr - String of JS function to validate * @returns {String} Function name string (if found) */ getFunctionNameFromString(funcStr) { const result = FUNCTION_NAME.exec(funcStr); if (!result || result.length === 0) return null; return result[1].trim(); }
step3a(word) { const match = /^(.+?)(ειο|ειοσ|ειοι|εια|ειασ|ειεσ|ειου|ειουσ|ειων)$/.exec( word ); return match && match[1].length > 4 ? match[1] : word; }
step2b(word) { const match = /^(.+?)(εδεσ|εδων)$/.exec(word); if (match) { let result = match[1]; if (/(οπ|ιπ|εμπ|υπ|γηπ|δαπ|κρασπ|μιλ)$/.test(result)) { result += 'εδ'; } return result; } return word; }
step2d(word) { const match = /^(.+?)(εωσ|εων|εασ|εα)$/.exec(word); if (match) { let result = match[1]; if (/^(θ|δ|ελ|γαλ|ν|π|ιδ|παρ|στερ|ορφ|ανδρ|αντρ)$/.test(result)) { result += 'ε'; } return result; } return word; }
step5l(word) { let result = word; const match = /^(.+?)(ουνε|ησουνε|ηθουνε)$/.exec(result); if (match) { [, result] = match; if (/^(ν|ρ|σπι|στραβομουτσ|κακομουτσ|εξων)$/.test(result)) { result += 'ουν'; } } return result; }
step5j(word) { let result = word; const match = /^(.+?)(ησε|ησου|ησα)$/.exec(result); if (match) { [, result] = match; if (/^(ν|χερσον|δωδεκαν|ερημον|μεγαλον|επταν|ι)$/.test(result)) { result += 'ησ'; } } return result; }
step5e(word) { let result = word; const match = /^(.+?)(ομαστε|ιομαστε)$/.exec(result); if (match) { [, result] = match; if (/^ον$/.test(result)) { result += 'ομαστ'; } } return result; }