conflict_resolution
stringlengths
27
16k
<<<<<<< { id: uuidv4(), name: "Mohammad Solgi", img: "https://avatars3.githubusercontent.com/u/65813366?s=400&u=4752dadd33efe830a095a2306ef5f4e797315bda&v=4", links: { website: "", linkedin: "https://www.linkedin.com/in/mohammad-solgi-a68841111/", github: "https://github.com/SolgiDeveloper" }, jobTitle: "Software Engineer | Full Stack Developer | Javascript Developer", location: { city: "Nahavand", state: "Hamedan", country: "Iran" } } ======= // Jasmin Rowdy { id: uuidv4(), name: "Jasmin Rowdy", img: "https://avatars0.githubusercontent.com/u/58674083?s=460&u=be994ec86c3be372599765e7a2335353a0d95a79&v=4", links: { website: "https://jrowdy.github.io/React-Portfolio/#/", linkedin: "https://www.linkedin.com/in/jrowdy-2020613/", github: "https://github.com/jrowdy" }, jobTitle: "Full Stack Web Developer | STEM Educator", location: { city: "Durham", state: "North Carolina", country: "United States" }, }, >>>>>>> // Jasmin Rowdy { id: uuidv4(), name: "Jasmin Rowdy", img: "https://avatars0.githubusercontent.com/u/58674083?s=460&u=be994ec86c3be372599765e7a2335353a0d95a79&v=4", links: { website: "https://jrowdy.github.io/React-Portfolio/#/", linkedin: "https://www.linkedin.com/in/jrowdy-2020613/", github: "https://github.com/jrowdy" }, jobTitle: "Full Stack Web Developer | STEM Educator", location: { city: "Durham", state: "North Carolina", country: "United States" }, }, { id: uuidv4(), name: "Mohammad Solgi", img: "https://avatars3.githubusercontent.com/u/65813366?s=400&u=4752dadd33efe830a095a2306ef5f4e797315bda&v=4", links: { website: "", linkedin: "https://www.linkedin.com/in/mohammad-solgi-a68841111/", github: "https://github.com/SolgiDeveloper" }, jobTitle: "Software Engineer | Full Stack Developer | Javascript Developer", location: { city: "Nahavand", state: "Hamedan", country: "Iran" } }
<<<<<<< { id: uuidv4(), name: "Akshay Anand", img: "", links: { website: "https://axayjha.github.io/", linkedin: "https://www.linkedin.com/in/axayjha/", github: "https://github.com/axayjha", }, jobTitle: "Full Stack Developer", location: { city: "Pune", state: "Maharashtra", country: "India", }, }, ======= { id: uuidv4(), name: "Patricia Felix", img: "https://avatars1.githubusercontent.com/u/49537577?v=4", links: { website: "", linkedin: "https://www.linkedin.com/in/patriciafelixx/", github: "https://github.com/patriciafelixx", }, jobTitle: "Full Stack Web Developer", location: { city: "", state: "São Paulo", country: "Brazil", }, }, >>>>>>> { id: uuidv4(), name: "Akshay Anand", img: "", links: { website: "https://axayjha.github.io/", linkedin: "https://www.linkedin.com/in/axayjha/", github: "https://github.com/axayjha", }, jobTitle: "Full Stack Developer", location: { city: "Pune", state: "Maharashtra", country: "India", }, }, { id: uuidv4(), name: "Patricia Felix", img: "https://avatars1.githubusercontent.com/u/49537577?v=4", links: { website: "", linkedin: "https://www.linkedin.com/in/patriciafelixx/", github: "https://github.com/patriciafelixx", }, jobTitle: "Full Stack Web Developer", location: { city: "", state: "São Paulo", country: "Brazil", }, },
<<<<<<< }, maintain_sub_directory_structure: function (test) { var actual = {}, expected = {}; var files = [{ filename: 'battle-cat.jpg', expected: 'test/expected/maintain_sub_directory_structure/320/', actual: 'tmp/maintain_sub_directory_structure/320/' }, { filename: 'battle-dog.jpg', expected: 'test/expected/maintain_sub_directory_structure/640/sub_directory/', actual: 'tmp/maintain_sub_directory_structure/640/sub_directory/' }]; test.expect(files.length); for (var i = 0, l = files.length; i < l; i++) { actual = grunt.file.read(files[i].actual + files[i].filename); expected = grunt.file.read(files[i].expected + files[i].filename); test.equal(actual, expected, 'should be the same image.'); } test.done(); ======= }, custom_dest_name: function(test) { var actual = {}, expected = {}; var files = [{ filename: 'tmnt.png', expected: 'test/expected/custom_dest_name/leo/', actual: 'tmp/custom_dest_name/leo/' }, { filename: 'tmnt.png', expected: 'test/expected/custom_dest_name/donnie/', actual: 'tmp/custom_dest_name/donnie/' },{ filename: 'tmnt.png', expected: 'test/expected/custom_dest_name/raph/', actual: 'tmp/custom_dest_name/raph/' }]; test.expect(files.length); for (var i = 0, l = files.length; i < l; i++) { actual = grunt.file.read(files[i].actual + files[i].filename); expected = grunt.file.read(files[i].expected + files[i].filename); test.equal(actual, expected, 'should be the same image.'); } test.done(); >>>>>>> }, custom_dest_name: function(test) { var actual = {}, expected = {}; var files = [{ filename: 'tmnt.png', expected: 'test/expected/custom_dest_name/leo/', actual: 'tmp/custom_dest_name/leo/' }, { filename: 'tmnt.png', expected: 'test/expected/custom_dest_name/donnie/', actual: 'tmp/custom_dest_name/donnie/' },{ filename: 'tmnt.png', expected: 'test/expected/custom_dest_name/raph/', actual: 'tmp/custom_dest_name/raph/' }]; test.expect(files.length); for (var i = 0, l = files.length; i < l; i++) { actual = grunt.file.read(files[i].actual + files[i].filename); expected = grunt.file.read(files[i].expected + files[i].filename); test.equal(actual, expected, 'should be the same image.'); } test.done(); }, maintain_sub_directory_structure: function (test) { var actual = {}, expected = {}; var files = [{ filename: 'battle-cat.jpg', expected: 'test/expected/maintain_sub_directory_structure/320/', actual: 'tmp/maintain_sub_directory_structure/320/' }, { filename: 'battle-dog.jpg', expected: 'test/expected/maintain_sub_directory_structure/640/sub_directory/', actual: 'tmp/maintain_sub_directory_structure/640/sub_directory/' }]; test.expect(files.length); for (var i = 0, l = files.length; i < l; i++) { actual = grunt.file.read(files[i].actual + files[i].filename); expected = grunt.file.read(files[i].expected + files[i].filename); test.equal(actual, expected, 'should be the same image.'); } test.done();
<<<<<<< ======= tally[sizeOptions.name] = 0; >>>>>>> tally[sizeOptions.name] = 0; <<<<<<< dstPath = path.join(dirName, subDir, baseName + sizeOptions.name + extName); ======= dstPath = path.join(dirName, baseName + sizeOptions.outputName + extName); >>>>>>> dstPath = path.join(dirName, subDir, baseName + sizeOptions.outputName + extName);
<<<<<<< if (sizeOptions.density) { image.density(sizeOptions.density, sizeOptions.density); } ======= // Add custom Output arguments to the graphics engine command after all other options, but before the output filename. // customOut: [ // '-gravity', 'SouthEast', '-font', "Arial", '-pointsize', '12', // '-fill', '#445', '-draw', 'text 5,2 \'\u00A9 copyright\'', // '-fill', '#ffe', '-draw', 'text 6,3 \'\u00A9 copyright\'' // ] // yields the command // gm "convert" ... "img/inputfile.jpg" "-resize" "1280x" "-gravity" "SouthEast" "-font" "Arial" "-pointsize" "12" "-fill" "#445" "-draw" "text 5,2 '© copyright'" "-fill" "#ffe" "-draw" "text 6,3 '© copyright'" "tmp/img/outputfile.jpg" if (isValidArray(sizeOptions.customOut)) { sizeOptions.customOut.forEach(function(val){ image.out(val); }); } else if (sizeOptions.customOut) { image.out(sizeOptions.customOut); } >>>>>>> if (sizeOptions.density) { image.density(sizeOptions.density, sizeOptions.density); } // Add custom Output arguments to the graphics engine command after all other options, but before the output filename. // customOut: [ // '-gravity', 'SouthEast', '-font', "Arial", '-pointsize', '12', // '-fill', '#445', '-draw', 'text 5,2 \'\u00A9 copyright\'', // '-fill', '#ffe', '-draw', 'text 6,3 \'\u00A9 copyright\'' // ] // yields the command // gm "convert" ... "img/inputfile.jpg" "-resize" "1280x" "-gravity" "SouthEast" "-font" "Arial" "-pointsize" "12" "-fill" "#445" "-draw" "text 5,2 '© copyright'" "-fill" "#ffe" "-draw" "text 6,3 '© copyright'" "tmp/img/outputfile.jpg" if (isValidArray(sizeOptions.customOut)) { sizeOptions.customOut.forEach(function(val){ image.out(val); }); } else if (sizeOptions.customOut) { image.out(sizeOptions.customOut); }
<<<<<<< ajaxRequest = sm.ajaxUpdateMarker( map, query ).done( function () { ======= ajaxRequest = sm.ajaxUpdateMarker( map, query).done( function () { map.createMarkerCluster(); >>>>>>> ajaxRequest = sm.ajaxUpdateMarker( map, query ).done( function () { map.createMarkerCluster();
<<<<<<< walk: function walk(cb) { traverse(this, node => cb(node)); ======= walk(cb) { return traverse(this, node => cb(node)); >>>>>>> walk(cb) { traverse(this, node => cb(node)); <<<<<<< match: function match(expression, cb) { Array.isArray(expression) ? this.walk(node => { for (let i = 0, len = expression.length; i < len; i++) { if (compare(expression[i], node)) return cb(node); } return node; }) : this.walk(node => { if (compare(expression, node)) return cb(node); return node; }); ======= match(precondition, cb) { return this.walk(node => { if(compare(precondition, node)) { return cb(node); } return node; }); >>>>>>> match(expression, cb) { Array.isArray(expression) ? this.walk(node => { for (let i = 0, len = expression.length; i < len; i++) { if (compare(expression[i], node)) return cb(node); } return node; }) : this.walk(node => { if (compare(expression, node)) return cb(node); return node; }); <<<<<<< matchClass: function matchClass(className, cb) { this.match({ attrs: { class: true }}, node => { ======= matchClass(className, cb) { return this.match({ attrs: { class: true }}, node => { >>>>>>> matchClass(className, cb) { this.match({ attrs: { class: true }}, node => {
<<<<<<< var i, j, k, len, ref, val; ======= var gp, i, j, k, len, max_hit, ref, val; >>>>>>> var gp, i, j, k, len, ref, val;
<<<<<<< var planner = compile('planner') var manager = compile('manager') stormpath.initializeMiddleware(app) ======= app.use('/api', auth) app.use('/api/campaigns', require('./campaign')) >>>>>>> stormpath.initializeMiddleware(app)
<<<<<<< commuterLocations = commuterLocations.map(function (cl) { return { organizationId : cl._location.get('created_by'), locationId : cl._location.get('_id'), name : cl._location.get('name'), fullAddress : cl._location.get('address') + ', ' + cl._location.get('city') + ', ' + cl._location.get('state'), matches: cl.matches } ======= if (err) { console.error(err) } commuterLocations = commuterLocations.map(function (commuterLocation) { return commuterLocation._location >>>>>>> commuterLocations = commuterLocations.map(function (cl) { return { organizationId : cl._location.get('created_by'), locationId : cl._location.get('_id'), name : cl._location.get('name'), fullAddress : cl._location.get('address') + ', ' + cl._location.get('city') + ', ' + cl._location.get('state'), matches: cl.matches } <<<<<<< var Match = view(require('./match.html')) Match.prototype.distanceMi = function () { return Math.round(this.model.distance * 100) / 100 } ======= >>>>>>> var Match = view(require('./match.html')) Match.prototype.distanceMi = function () { return Math.round(this.model.distance * 100) / 100 }
<<<<<<< function ConfigStream(configString) { Readable.call(this); this._sent = false; this._configString = configString; } inherits(ConfigStream, Readable); ConfigStream.prototype._read = function() { if (!this._sent) { this.push(this._configString); this._sent = true; } else { this.push(null); } }; ======= Runner.prototype.loadLog = function(jobName, buildId, end) { var dir = cwd(jobName, buildId); var lc = 0; function write(line) { var stream = this; if (!end || end === -1) { stream.queue(String(line) + '\n'); } else { lc === end ? stream.queue(null) : stream.queue(String(line) + '\n'); lc++; } } var stream = fs.createReadStream(path.join(dir, 'out.log')) .pipe(es.split('\n')) .pipe(es.through(write)); return stream; }; >>>>>>> function ConfigStream(configString) { Readable.call(this); this._sent = false; this._configString = configString; } inherits(ConfigStream, Readable); ConfigStream.prototype._read = function() { if (!this._sent) { this.push(this._configString); this._sent = true; } else { this.push(null); } }; Runner.prototype.loadLog = function(jobName, buildId, end) { var dir = cwd(jobName, buildId); var lc = 0; function write(line) { var stream = this; if (!end || end === -1) { stream.queue(String(line) + '\n'); } else { lc === end ? stream.queue(null) : stream.queue(String(line) + '\n'); lc++; } } var stream = fs.createReadStream(path.join(dir, 'out.log')) .pipe(es.split('\n')) .pipe(es.through(write)); return stream; };
<<<<<<< var build = { _id: 0, status: "success", createdTime: Date.now() }; var build2 = { _id: 1, status: "failure", createdTime: Date.now() }; ======= var build = { id: '1', status: "success", createdTime: Date.now() }; var build2 = { id: '2', status: "failure", createdTime: Date.now() }; var initReady = 2; >>>>>>> var build = { _id: 0, status: "success", createdTime: Date.now() }; var build2 = { _id: 1, status: "failure", createdTime: Date.now() }; var initReady = 2;
<<<<<<< return Promise.resolve({ _index: kuzzle.config.internalIndex, ======= return q({ _index: '%kuzzle', >>>>>>> return q({ _index: kuzzle.config.internalIndex,
<<<<<<< transpileToEs5: true, onTranspileToEs5Changed: this._onTranspileToEs5Changed.bind(this), shortcuts: shortcuts, es6Katas: this._es6Katas || null ======= shortcuts, es6Katas: this._es6Katas || null, >>>>>>> transpileToEs5: true, onTranspileToEs5Changed: this._onTranspileToEs5Changed.bind(this), shortcuts: shortcuts, es6Katas: this._es6Katas || null,
<<<<<<< beforeEach(function () { indexCacheAdded = false; }); it('should reject an empty request', function (done) { ======= it('should reject an empty request', function () { >>>>>>> beforeEach(function () { indexCacheAdded = false; }); it('should reject an empty request', function () {
<<<<<<< }, { scoreName: "pageTitleKeyword", scoreTitleKeywordLimit: 0, scoreArray: [ { matcher: "matches", max: 0, score: 2, /* translators: %1$s expands to the focus keyword */ text: i18n.dgettext( "js-text-analysis", "The focus keyword '%1$s' does not appear in the page title.") }, { matcher: "position", max: 1, score: 9, text: i18n.dgettext( "js-text-analysis", "The page title contains the focus keyword, at the beginning which is considered to improve rankings.") }, { matcher: "position", min: 1, score: 6, text: i18n.dgettext( "js-text-analysis", "The page title contains the focus keyword, but it does not appear at the beginning; try and move it to the beginning.") } ], replaceArray: [ {name: "keyword", position: "%1$s", sourceObj: ".refObj.config.keyword"} ] }, { ======= },{ scoreName: "urlKeyword", scoreArray: [ { min: 1, score: 9, text: i18n.dgettext( "js-text-analysis", "The focus keyword appears in the URL for this page.")}, { max: 0, score: 6, text: i18n.dgettext( "js-text-analysis", "The focus keyword does not appear in the URL for this page. If you decide to rename the URL be sure to check the old URL 301 redirects to the new one!" ) } ] }, { >>>>>>> }, {
<<<<<<< "countSentencesFromText": countSentencesFromText, "countSentencesFromDescription": countSentencesFromDescription, "getSubheadingLength": getSubheadingLength ======= "getSubheadingLength": getSubheadingLength, "getSubheadingPresence": getSubheadingPresence >>>>>>> "countSentencesFromText": countSentencesFromText, "countSentencesFromDescription": countSentencesFromDescription, "getSubheadingLength": getSubheadingLength, "getSubheadingPresence": getSubheadingPresence
<<<<<<< // todo: remove topic density from seoAssessor and move it to seoAssessorPremium after it is ready. var TopicDensity = require( "./assessments/seo/topicDensityAssessment.js" ); ======= const LargestKeywordDistance = require( "./assessments/seo/largestKeywordDistanceAssessment.js" ); >>>>>>> // todo: remove topic density from seoAssessor and move it to seoAssessorPremium after it is ready. var TopicDensity = require( "./assessments/seo/topicDensityAssessment.js" ); const LargestKeywordDistance = require( "./assessments/seo/largestKeywordDistanceAssessment.js" ); <<<<<<< new TopicDensity(), ======= new LargestKeywordDistance(), >>>>>>> new TopicDensity(), new LargestKeywordDistance(),
<<<<<<< import AnalysisWorker from "yoastseo/worker"; ======= import AnalysisWorkerWrapper from "yoastseo/worker/AnalysisWorkerWrapper"; import testPapers from "yoastspec/fullTextTests/testTexts"; >>>>>>> import AnalysisWorker from "yoastseo/worker"; import testPapers from "yoastspec/fullTextTests/testTexts";
<<<<<<< expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.determinesSentencePartIsPassive() ).toBe( false ); } ); it( "checks the properties of the Italian participle object with a precedence exception", function() { // Direct precedence exception word: il. const mockParticiple = new ItalianParticiple( "mandato", "Dovresti andare a vedere se esiste il mandato.", { auxiliaries: [ "andare" ], type: "irregular", language: "it", } ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); ======= expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.determinesSentencePartIsPassive() ).toBe( false ); } ); it( "checks the properties of the Italian participle object with a precedence exception", function() { // Direct precedence exception word: il. let mockParticiple = new ItalianParticiple( "mandato", "Dovresti andare a vedere se esiste il mandato.", { auxiliaries: [ "andare" ], type: "irregular", language: "it", } ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); >>>>>>> expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.determinesSentencePartIsPassive() ).toBe( false ); } ); it( "checks the properties of the Italian participle object with a precedence exception", function() { // Direct precedence exception word: il. const mockParticiple = new ItalianParticiple( "mandato", "Dovresti andare a vedere se esiste il mandato.", { auxiliaries: [ "andare" ], type: "irregular", language: "it", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true ); expect( mockParticiple.determinesSentencePartIsPassive() ).toBe( false ); } ); it( "checks the properties of the Italian participle object with a precedence exception", function() { // Direct precedence exception word: il. let mockParticiple = new ItalianParticiple( "mandato", "Dovresti andare a vedere se esiste il mandato.", { auxiliaries: [ "andare" ], type: "irregular", language: "it", } ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "it" ) ).toBe( true );
<<<<<<< describe( "a test for getting the correct first word exception array", function() { it( "returns the English first word exception array in case of en_US locale", function() { expect( firstWordExceptions( "en_US" )() ).toEqual( [ 'the', 'a', 'an', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'this', 'that', 'these', 'those' ] ); } ); it( "returns the French first word exception array in case of fr_FR locale", function() { expect( firstWordExceptions( "fr_FR" )() ).toEqual( [ 'le', 'la', 'les', 'un', 'une', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf', 'dix', 'celui', 'celle', 'ceux', 'celles', 'celui-ci', 'celle-là', 'celui-là', 'celle-ci' ] ); } ); it( "returns the Spanish first word exception array in case of es_ES locale", function() { expect( firstWordExceptions( "es_ES" )() ).toEqual( [ 'el', 'los', 'la', 'las', 'un', 'una', 'unas', 'unos', 'uno', 'dos', 'tres', 'cuatro', 'cinco', 'seis', 'siete', 'ocho', 'nueve', 'diez', 'este', 'estos', 'esta', 'estas', 'ese', 'esos', 'esa', 'esas', 'aquel', 'aquellos', 'aquella', 'aquellas', 'esto', 'eso', 'aquello' ] ); } ); it( "returns the German first word exception array in case of de_DE locale", function() { expect( firstWordExceptions( "de_DE" )() ).toEqual( [ 'das', 'dem', 'den', 'der', 'des', 'die', 'ein', 'eine', 'einem', 'einen', 'einer', 'eines', 'eins', 'zwei', 'drei', 'vier', 'fünf', 'sechs', 'sieben', 'acht', 'neun', 'zehn', 'denen', 'deren', 'derer', 'dessen', 'diese', 'diesem', 'diesen', 'dieser', 'dieses', 'jene', 'jenem', 'jenen', 'jener', 'jenes', 'welch', 'welcher', 'welches' ] ); } ); it( "returns the Dutch first word exception array in case of nl_NL locale", function() { expect( firstWordExceptions( "nl_NL" )() ).toEqual( [ 'de', 'het', 'een', 'één', 'eén', 'twee', 'drie', 'vier', 'vijf', 'zes', 'zeven', 'acht', 'negen', 'tien', 'dit', 'dat', 'die', 'deze' ] ); } ); it( "returns the Italian first word exception array in case of it_IT locale", function() { expect( firstWordExceptions( "it_IT" )() ).toEqual( [ 'il', 'lo', 'la', 'i', 'gli', 'le', 'uno', 'un', 'una', 'due', 'tre', 'quattro', 'cinque', 'sei', 'sette', 'otto', 'nove', 'dieci', 'questo', 'questa', 'quello', 'quella', 'questi', 'queste', 'quelli', 'quelle', 'codesto', 'codesti', 'codesta', 'codeste' ] ); } ); it( "returns the Russian first word exception array in case of ru_RU locale", function() { expect( firstWordExceptions( "ru_RU" )() ).toEqual( [ "один", "одна", "одно", "два", "две", "три", "четыре", "пять", "шесть", "семь", "восемь", "девять", "десять", "этот", "этого", "этому", "этим", "этом", "эта", "этой", "эту", "это", "этого", "этому", "эти", "этих", "этим", "этими", "тот", "того", "тому", "тем", "том", "та", "той", "ту", "те", "тех", "тем", "теми", "тех", "такой", "такого", "такому", "таким", "такая", "такую", "такое", "такие", "таких", "таким", "такими", "стольких", "стольким", "столько", "столькими", "вот" ] ); } ); it( "returns the English first word exception array in case of empty locale", function() { expect( firstWordExceptions( "" )() ).toEqual( [ 'the', 'a', 'an', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'this', 'that', 'these', 'those' ] ); } ); it( "returns the English first word exception array in case of non-existing locale", function() { expect( firstWordExceptions( "xx_yy" )() ).toEqual( [ 'the', 'a', 'an', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'this', 'that', 'these', 'those' ] ); } ); } ); ======= describe( "a test for getting the correct first word exception array", function() { it( "returns the English first word exception array in case of en_US locale", function() { expect( firstWordExceptions( "en_US" )() ).toEqual( [ "the", "a", "an", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "this", "that", "these", "those" ] ); } ); it( "returns the French first word exception array in case of fr_FR locale", function() { expect( firstWordExceptions( "fr_FR" )() ).toEqual( [ "le", "la", "les", "un", "une", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix", "celui", "celle", "ceux", "celles", "celui-ci", "celle-là", "celui-là", "celle-ci" ] ); } ); it( "returns the Spanish first word exception array in case of es_ES locale", function() { expect( firstWordExceptions( "es_ES" )() ).toEqual( [ "el", "los", "la", "las", "un", "una", "unas", "unos", "uno", "dos", "tres", "cuatro", "cinco", "seis", "siete", "ocho", "nueve", "diez", "este", "estos", "esta", "estas", "ese", "esos", "esa", "esas", "aquel", "aquellos", "aquella", "aquellas", "esto", "eso", "aquello" ] ); } ); it( "returns the German first word exception array in case of de_DE locale", function() { expect( firstWordExceptions( "de_DE" )() ).toEqual( [ "das", "dem", "den", "der", "des", "die", "ein", "eine", "einem", "einen", "einer", "eines", "eins", "zwei", "drei", "vier", "fünf", "sechs", "sieben", "acht", "neun", "zehn", "denen", "deren", "derer", "dessen", "diese", "diesem", "diesen", "dieser", "dieses", "jene", "jenem", "jenen", "jener", "jenes", "welch", "welcher", "welches" ] ); } ); it( "returns the Dutch first word exception array in case of nl_NL locale", function() { expect( firstWordExceptions( "nl_NL" )() ).toEqual( [ "de", "het", "een", "één", "eén", "twee", "drie", "vier", "vijf", "zes", "zeven", "acht", "negen", "tien", "dit", "dat", "die", "deze" ] ); } ); it( "returns the Italian first word exception array in case of it_IT locale", function() { expect( firstWordExceptions( "it_IT" )() ).toEqual( [ "il", "lo", "la", "i", "gli", "le", "uno", "un", "una", "due", "tre", "quattro", "cinque", "sei", "sette", "otto", "nove", "dieci", "questo", "questa", "quello", "quella", "questi", "queste", "quelli", "quelle", "codesto", "codesti", "codesta", "codeste" ] ); } ); it( "returns the English first word exception array in case of empty locale", function() { expect( firstWordExceptions( "" )() ).toEqual( [ "the", "a", "an", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "this", "that", "these", "those" ] ); } ); it( "returns the English first word exception array in case of non-existing locale", function() { expect( firstWordExceptions( "xx_yy" )() ).toEqual( [ "the", "a", "an", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "this", "that", "these", "those" ] ); } ); } ); >>>>>>> describe( "a test for getting the correct first word exception array", function() { it( "returns the English first word exception array in case of en_US locale", function() { expect( firstWordExceptions( "en_US" )() ).toEqual( [ "the", "a", "an", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "this", "that", "these", "those" ] ); } ); it( "returns the French first word exception array in case of fr_FR locale", function() { expect( firstWordExceptions( "fr_FR" )() ).toEqual( [ "le", "la", "les", "un", "une", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix", "celui", "celle", "ceux", "celles", "celui-ci", "celle-là", "celui-là", "celle-ci" ] ); } ); it( "returns the Spanish first word exception array in case of es_ES locale", function() { expect( firstWordExceptions( "es_ES" )() ).toEqual( [ "el", "los", "la", "las", "un", "una", "unas", "unos", "uno", "dos", "tres", "cuatro", "cinco", "seis", "siete", "ocho", "nueve", "diez", "este", "estos", "esta", "estas", "ese", "esos", "esa", "esas", "aquel", "aquellos", "aquella", "aquellas", "esto", "eso", "aquello" ] ); } ); it( "returns the German first word exception array in case of de_DE locale", function() { expect( firstWordExceptions( "de_DE" )() ).toEqual( [ "das", "dem", "den", "der", "des", "die", "ein", "eine", "einem", "einen", "einer", "eines", "eins", "zwei", "drei", "vier", "fünf", "sechs", "sieben", "acht", "neun", "zehn", "denen", "deren", "derer", "dessen", "diese", "diesem", "diesen", "dieser", "dieses", "jene", "jenem", "jenen", "jener", "jenes", "welch", "welcher", "welches" ] ); } ); it( "returns the Dutch first word exception array in case of nl_NL locale", function() { expect( firstWordExceptions( "nl_NL" )() ).toEqual( [ "de", "het", "een", "één", "eén", "twee", "drie", "vier", "vijf", "zes", "zeven", "acht", "negen", "tien", "dit", "dat", "die", "deze" ] ); } ); it( "returns the Italian first word exception array in case of it_IT locale", function() { expect( firstWordExceptions( "it_IT" )() ).toEqual( [ "il", "lo", "la", "i", "gli", "le", "uno", "un", "una", "due", "tre", "quattro", "cinque", "sei", "sette", "otto", "nove", "dieci", "questo", "questa", "quello", "quella", "questi", "queste", "quelli", "quelle", "codesto", "codesti", "codesta", "codeste" ] ); } ); it( "returns the Russian first word exception array in case of ru_RU locale", function() { expect( firstWordExceptions( "ru_RU" )() ).toEqual( [ "один", "одна", "одно", "два", "две", "три", "четыре", "пять", "шесть", "семь", "восемь", "девять", "десять", "этот", "этого", "этому", "этим", "этом", "эта", "этой", "эту", "это", "этого", "этому", "эти", "этих", "этим", "этими", "тот", "того", "тому", "тем", "том", "та", "той", "ту", "те", "тех", "тем", "теми", "тех", "такой", "такого", "такому", "таким", "такая", "такую", "такое", "такие", "таких", "таким", "такими", "стольких", "стольким", "столько", "столькими", "вот" ] ); } ); it( "returns the English first word exception array in case of empty locale", function() { expect( firstWordExceptions( "" )() ).toEqual( [ "the", "a", "an", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "this", "that", "these", "those" ] ); } ); it( "returns the English first word exception array in case of non-existing locale", function() { expect( firstWordExceptions( "xx_yy" )() ).toEqual( [ "the", "a", "an", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "this", "that", "these", "those" ] ); } ); } );
<<<<<<< YoastSEO.App.prototype.constructI18n = function( translations ) { ======= App.prototype.constructI18n = function( translations ) { var Jed = require( "jed" ); >>>>>>> App.prototype.constructI18n = function( translations ) { <<<<<<< YoastSEO.App.prototype.getData = function() { ======= App.prototype.getData = function() { var isUndefined = require( "lodash/lang/isUndefined" ); >>>>>>> App.prototype.getData = function() { <<<<<<< YoastSEO.App.prototype.reloadSnippetText = function() { if ( isUndefined( this.snippetPreview ) ) { ======= App.prototype.reloadSnippetText = function() { if ( typeof this.snippetPreview !== "undefined" ) { >>>>>>> App.prototype.reloadSnippetText = function() { if ( isUndefined( this.snippetPreview ) ) { <<<<<<< if ( isUndefined( this.pageAnalyzer ) ) { this.pageAnalyzer = new YoastSEO.Analyzer( this.analyzerData ); ======= if ( typeof this.pageAnalyzer === "undefined" ) { this.pageAnalyzer = new Analyzer( this.analyzerData ); >>>>>>> if ( isUndefined( this.pageAnalyzer ) ) { this.pageAnalyzer = new Analyzer( this.analyzerData );
<<<<<<< it( "returns a 'consideration' score when the Gini coefficient calculated from the step function is -1 (as a result of no keyword occurrences)", function() { const mockPaper = new Paper( "a string", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: -1 } ), i18n ); ======= it( "returns a 'consideration' score when no keyword occurs", function() { let mockPaper = new Paper( "a string", { keyword: "keyword" } ); let assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 100, sentencesToHighlight: [], } ), i18n ); >>>>>>> it( "returns a 'consideration' score when no keyword occurs", function() { const mockPaper = new Paper( "a string", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 100, sentencesToHighlight: [], } ), i18n ); <<<<<<< it( "returns a bad score when the Gini coefficient calculated from the step function is higher than the recommended good score", function() { const mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 0.7 } ), i18n ); ======= it( "returns a bad score when the % of sentences between topic occurrences is above 50%", function() { let mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); let assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 60, sentencesToHighlight: [], } ), i18n ); >>>>>>> it( "returns a bad score when the % of sentences between topic occurrences is above 50%", function() { const mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 60, sentencesToHighlight: [], } ), i18n ); <<<<<<< it( "returns an okay score when the Gini coefficient calculated from the step function is between recommended acceptable and good score", function() { const mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 0.5 } ), i18n ); ======= it( "returns an okay score when the % of sentences between topic occurrences is between recommended acceptable and good score", function() { let mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); let assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 40, sentencesToHighlight: [], } ), i18n ); >>>>>>> it( "returns an okay score when the % of sentences between topic occurrences is between recommended acceptable and good score", function() { const mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 40, sentencesToHighlight: [], } ), i18n ); <<<<<<< it( "returns a good score score when the Gini coefficient calculated from the step functionn is lower than the recommended good score", function() { const mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 0.3 } ), i18n ); ======= it( "returns a good score score when the % of sentences between topic occurrences is lower than the recommended good score", function() { let mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); let assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 25, sentencesToHighlight: [], } ), i18n ); >>>>>>> it( "returns a good score score when the % of sentences between topic occurrences is lower than the recommended good score", function() { const mockPaper = new Paper( "string with the keyword and the keyword", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 25, sentencesToHighlight: [], } ), i18n ); <<<<<<< it( "is applicable to papers with more than 200 words when a keyword is set", function() { const mockPaper = new Paper( "Lorem ipsum dolor sit amet, vim illum aeque" + ======= it( "is applicable to papers with more than 10 sentences when a keyword is set", function() { let mockPaper = new Paper( "Lorem ipsum dolor sit amet, vim illum aeque" + >>>>>>> it( "is applicable to papers with more than 10 sentences when a keyword is set", function() { const mockPaper = new Paper( "Lorem ipsum dolor sit amet, vim illum aeque" + <<<<<<< it( "is not applicable to papers with more than 200 words when no keyword is set", function() { const mockPaper = new Paper( "Lorem ipsum dolor sit amet, vim illum aeque" + ======= it( "is not applicable to papers with more than 10 sentences when no keyword is set", function() { let mockPaper = new Paper( "Lorem ipsum dolor sit amet, vim illum aeque" + >>>>>>> it( "is not applicable to papers with more than 10 sentences when no keyword is set", function() { const mockPaper = new Paper( "Lorem ipsum dolor sit amet, vim illum aeque" + <<<<<<< it( "is not applicable to papers with less than 200 words", function() { const mockPaper = new Paper( "Lorem ipsum dolor sit amet.", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.isApplicable( mockPaper ); ======= it( "is not applicable to papers with less than 15 sentences", function() { let mockPaper = new Paper( "Lorem ipsum dolor sit amet.", { keyword: "keyword" } ); let assessment = keyphraseDistributionAssessment.isApplicable( mockPaper ); >>>>>>> it( "is not applicable to papers with less than 15 sentences", function() { const mockPaper = new Paper( "Lorem ipsum dolor sit amet.", { keyword: "keyword" } ); const assessment = keyphraseDistributionAssessment.isApplicable( mockPaper ); <<<<<<< const mockPaper = new Paper( "A sentence. A sentence containing keywords. Another sentence.", { keyword: "keyword" } ); keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 5, sentencesToHighlight: [ "A sentence.", "Another sentence." ] } ), i18n ); const expected = [ ======= let mockPaper = new Paper( "A sentence. A sentence containing keywords. Another sentence.", { keyword: "keyword" } ); keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 5, sentencesToHighlight: [ new Mark( { original: "A sentence.", marked: "<yoastmark class='yoast-text-mark'>A sentence.</yoastmark>", } ), new Mark( { original: "Another sentence.", marked: "<yoastmark class='yoast-text-mark'>Another sentence.</yoastmark>", } ), ], } ), i18n ); let expected = [ >>>>>>> const mockPaper = new Paper( "A sentence. A sentence containing keywords. Another sentence.", { keyword: "keyword" } ); keyphraseDistributionAssessment.getResult( mockPaper, Factory.buildMockResearcher( { keyphraseDistributionScore: 5, sentencesToHighlight: [ new Mark( { original: "A sentence.", marked: "<yoastmark class='yoast-text-mark'>A sentence.</yoastmark>", } ), new Mark( { original: "Another sentence.", marked: "<yoastmark class='yoast-text-mark'>Another sentence.</yoastmark>", } ), ], } ), i18n ); const expected = [
<<<<<<< assessments.pageTitleKeyword = require( "./assessments/pagetitleKeyword.js" ); ======= assessments.metaDescriptionLength = require( "./assessments/metaDescriptionLength.js" ); >>>>>>> assessments.pageTitleKeyword = require( "./assessments/pagetitleKeyword.js" ); assessments.metaDescriptionLength = require( "./assessments/metaDescriptionLength.js" );
<<<<<<< new IntroductionKeyword(), keyphraseLength, keywordDensity, ======= introductionKeyword, new KeyphraseLengthAssessment(), new KeywordDensityAssessment(), >>>>>>> new IntroductionKeyword(), new KeyphraseLengthAssessment(), new KeywordDensityAssessment(), <<<<<<< internalLinks, new TitleKeyword(), ======= new InternalLinksAssessment(), titleKeyword, >>>>>>> new TitleKeyword(), new InternalLinksAssessment(),
<<<<<<< const isEmpty = require( "lodash/isEmpty" ); ======= import { escapeRegExp } from "lodash-es"; >>>>>>> import { escapeRegExp } from "lodash-es"; import { isEmpty } from "lodash-es";
<<<<<<< let IntroductionKeyword = require( "../assessments/seo/introductionKeywordAssessment.js" ); let keyphraseLength = require( "../assessments/seo/keyphraseLengthAssessment.js" ); let keywordDensity = require( "../assessments/seo/keywordDensityAssessment.js" ); let keywordStopWords = require( "../assessments/seo/keywordStopWordsAssessment.js" ); let MetaDescriptionKeyword = require( "../assessments/seo/metaDescriptionKeywordAssessment.js" ); let MetaDescriptionLength = require( "../assessments/seo/metaDescriptionLengthAssessment.js" ); let SubheadingsKeyword = require( "../assessments/seo/subheadingsKeywordAssessment.js" ); let TextCompetingLinks = require( "../assessments/seo/textCompetingLinksAssessment.js" ); let TextImages = require( "../assessments/seo/textImagesAssessment.js" ); let TextLength = require( "../assessments/seo/textLengthAssessment.js" ); let OutboundLinks = require( "../assessments/seo/outboundLinksAssessment.js" ); let internalLinks = require( "../assessments/seo/internalLinksAssessment" ); let TitleKeyword = require( "../assessments/seo/titleKeywordAssessment.js" ); let TitleWidth = require( "../assessments/seo/pageTitleWidthAssessment.js" ); let UrlKeyword = require( "../assessments/seo/urlKeywordAssessment.js" ); let UrlLength = require( "../assessments/seo/urlLengthAssessment.js" ); let urlStopWords = require( "../assessments/seo/urlStopWordsAssessment.js" ); ======= import * as Assessor from "../assessor"; import * as SEOAssessor from "../seoAssessor"; import * as introductionKeyword from "../assessments/seo/introductionKeywordAssessment"; import KeyphraseLengthAssessment from "../assessments/seo/KeyphraseLengthAssessment"; import KeywordDensityAssessment from "../assessments/seo/KeywordDensityAssessment"; import * as keywordStopWords from "../assessments/seo/keywordStopWordsAssessment"; import * as metaDescriptionKeyword from "../assessments/seo/metaDescriptionKeywordAssessment"; import * as MetaDescriptionLength from "../assessments/seo/metaDescriptionLengthAssessment"; import * as SubheadingsKeyword from "../assessments/seo/subheadingsKeywordAssessment"; import * as textCompetingLinks from "../assessments/seo/textCompetingLinksAssessment"; import * as TextImages from "../assessments/seo/textImagesAssessment"; import * as TextLength from "../assessments/seo/textLengthAssessment"; import * as OutboundLinks from "../assessments/seo/outboundLinksAssessment"; import InternalLinksAssessment from "../assessments/seo/InternalLinksAssessment"; import * as titleKeyword from "../assessments/seo/titleKeywordAssessment"; import * as TitleWidth from "../assessments/seo/pageTitleWidthAssessment"; import UrlKeywordAssessment from "../assessments/seo/UrlKeywordAssessment"; import * as UrlLength from "../assessments/seo/urlLengthAssessment"; import * as urlStopWords from "../assessments/seo/urlStopWordsAssessment"; >>>>>>> import * as Assessor from "../assessor"; import * as SEOAssessor from "../seoAssessor"; import * as IntroductionKeyword from "../assessments/seo/introductionKeywordAssessment"; import KeyphraseLengthAssessment from "../assessments/seo/KeyphraseLengthAssessment"; import KeywordDensityAssessment from "../assessments/seo/KeywordDensityAssessment"; import * as keywordStopWords from "../assessments/seo/keywordStopWordsAssessment"; import * as MetaDescriptionKeyword from "../assessments/seo/metaDescriptionKeywordAssessment"; import * as MetaDescriptionLength from "../assessments/seo/metaDescriptionLengthAssessment"; import * as SubheadingsKeyword from "../assessments/seo/subheadingsKeywordAssessment"; import * as TextCompetingLinks from "../assessments/seo/textCompetingLinksAssessment"; import * as TextImages from "../assessments/seo/textImagesAssessment"; import * as TextLength from "../assessments/seo/textLengthAssessment"; import * as OutboundLinks from "../assessments/seo/outboundLinksAssessment"; import InternalLinksAssessment from "../assessments/seo/InternalLinksAssessment"; import * as TitleKeyword from "../assessments/seo/titleKeywordAssessment"; import * as TitleWidth from "../assessments/seo/pageTitleWidthAssessment"; import UrlKeywordAssessment from "../assessments/seo/UrlKeywordAssessment"; import * as UrlLength from "../assessments/seo/urlLengthAssessment"; import * as urlStopWords from "../assessments/seo/urlStopWordsAssessment"; <<<<<<< new IntroductionKeyword(), keyphraseLength, keywordDensity, ======= introductionKeyword, new KeyphraseLengthAssessment(), new KeywordDensityAssessment(), >>>>>>> new IntroductionKeyword(), new KeyphraseLengthAssessment(), new KeywordDensityAssessment(), <<<<<<< internalLinks, new TitleKeyword(), ======= new InternalLinksAssessment(), titleKeyword, >>>>>>> new TitleKeyword(), new InternalLinksAssessment(),
<<<<<<< assessments.stopwordKeywordCount = require( "./assessments/stopWordsInKeyword.js" ); assessments.urlStopwords = require( "./assessments/stopWordsInUrl.js" ); ======= assessments.metaDescriptionLength = require( "./assessments/metaDescriptionLength.js" ); >>>>>>> assessments.stopwordKeywordCount = require( "./assessments/stopWordsInKeyword.js" ); assessments.urlStopwords = require( "./assessments/stopWordsInUrl.js" ); assessments.metaDescriptionLength = require( "./assessments/metaDescriptionLength.js" );
<<<<<<< const wordMatch = require( "../stringProcessing/matchTextWithWord.js" ); const findTopicFormsInString = require( "./findKeywordFormsInString.js" ).findTopicFormsInString; ======= import wordMatch from "../stringProcessing/matchTextWithWord.js"; >>>>>>> import wordMatch from "../stringProcessing/matchTextWithWord.js"; const findTopicFormsInString = require( "./findKeywordFormsInString.js" ).findTopicFormsInString; <<<<<<< module.exports = function( paper, researcher ) { ======= export default function( paper ) { const title = paper.getTitle(); >>>>>>> export default function( paper, researcher ) {
<<<<<<< assessments.subHeadings = require( "./assessments/matchKeywordInSubheading.js" ); ======= assessments.metaDescriptionLength = require( "./assessments/metaDescriptionLength.js" ); >>>>>>> assessments.subHeadings = require( "./assessments/matchKeywordInSubheading.js" ); assessments.metaDescriptionLength = require( "./assessments/metaDescriptionLength.js" );
<<<<<<< var wordCount = require( "./stringProcessing/countWords.js" ); var calculateFleschReading = require( "./analyses/calculateFleschReading" ); ======= >>>>>>> var wordCount = require( "./stringProcessing/countWords.js" ); var calculateFleschReading = require( "./analyses/calculateFleschReading" ); <<<<<<< "wordCount": wordCount, "calculateFleschReading": calculateFleschReading ======= "wordCount": wordCount, "getLinkStatistics": getLinkStatistics >>>>>>> "wordCount": wordCount, "calculateFleschReading": calculateFleschReading "getLinkStatistics": getLinkStatistics
<<<<<<< import getResults from "../specHelpers/getAssessorResults"; let Assessor = require( "../../js/cornerstone/seoAssessor.js" ); let Paper = require( "../../js/values/Paper.js" ); ======= let Assessor = require( "../../src/cornerstone/seoAssessor.js" ); let Paper = require( "../../src/values/Paper.js" ); >>>>>>> import getResults from "../specHelpers/getAssessorResults"; let Assessor = require( "../../src/cornerstone/seoAssessor.js" ); let Paper = require( "../../src/values/Paper.js" );
<<<<<<< ======= * Returns the metaDescription, includes the date if it is set. * * @returns {string} */ var getMetaDesc = function() { var metaDesc = this.data.metaDesc; if ( !isEmpty( this.opts.metaDescriptionDate ) && !isEmpty( metaDesc ) ) { metaDesc = this.opts.metaDescriptionDate + " - " + this.data.metaDesc; } return metaDesc; }; /** >>>>>>>
<<<<<<< assessments.pageTitleKeyword = require( "./assessments/pageTitleKeyword.js" ); ======= assessments.stopwordKeywordCount = require( "./assessments/stopWordsInKeyword.js" ); assessments.urlStopwords = require( "./assessments/stopWordsInUrl.js" ); >>>>>>> assessments.pageTitleKeyword = require( "./assessments/pageTitleKeyword.js" ); assessments.stopwordKeywordCount = require( "./assessments/stopWordsInKeyword.js" ); assessments.urlStopwords = require( "./assessments/stopWordsInUrl.js" );
<<<<<<< assessments.urlLength = require( "./assessments/urlLength.js" ); ======= assessments.linkCount = require( "./assessments/getLinkStatistics.js" ); >>>>>>> assessments.urlLength = require( "./assessments/urlLength.js" ); assessments.linkCount = require( "./assessments/getLinkStatistics.js" );
<<<<<<< // German papers import germanPaper1 from "./de/germanPaper1"; ======= // French papers import frenchPaper1 from "./fr/frenchPaper1"; import frenchPaper2 from "./fr/frenchPaper2"; import frenchPaper3 from "./fr/frenchPaper3"; >>>>>>> // German papers import germanPaper1 from "./de/germanPaper1"; // French papers import frenchPaper1 from "./fr/frenchPaper1"; import frenchPaper2 from "./fr/frenchPaper2"; import frenchPaper3 from "./fr/frenchPaper3"; <<<<<<< germanPaper1, ======= frenchPaper1, frenchPaper2, frenchPaper3, >>>>>>> germanPaper1, frenchPaper1, frenchPaper2, frenchPaper3,
<<<<<<< var YoastSEO_args = { ======= var args = { //source to use as feeder for the analyzer and snippetPreview >>>>>>> var YoastSEO_args = { //source to use as feeder for the analyzer and snippetPreview
<<<<<<< var metaText; if(typeof this.refObj.source.formattedData.excerpt !== "undefined"){ metaText = this.refObj.source.formattedData.excerpt.substring(0, analyzerConfig.maxMeta); } if(metaText === ""){ var indexMatches = this.getIndexMatches(); var periodMatches = this.getPeriodMatches(); metaText = this.refObj.source.formattedData.text.substring(0, analyzerConfig.maxMeta); var curStart = 0; if (indexMatches.length > 0) { for (var j = 0; j < periodMatches.length;) { if (periodMatches[0] < indexMatches[0]) { curStart = periodMatches.shift(); } else { if (curStart > 0) { curStart += 2; } break; ======= var indexMatches = this.getIndexMatches(); var periodMatches = this.getPeriodMatches(); var metaText = this.refObj.inputs.textString.substring(0, analyzerConfig.maxMeta); var curStart = 0; if(indexMatches.length > 0) { for (var i = 0; i < periodMatches.length; ) { if (periodMatches[0] < indexMatches[0] ) { curStart = periodMatches.shift(); } else { if( curStart > 0 ){ curStart += 2; >>>>>>> var metaText; if(typeof this.refObj.source.formattedData.excerpt !== "undefined"){ metaText = this.refObj.source.formattedData.excerpt.substring(0, analyzerConfig.maxMeta); } if(metaText === ""){ var indexMatches = this.getIndexMatches(); var periodMatches = this.getPeriodMatches(); metaText = this.refObj.source.formattedData.text.substring(0, analyzerConfig.maxMeta); var curStart = 0; if (indexMatches.length > 0) { for (var j = 0; j < periodMatches.length;) { if (periodMatches[0] < indexMatches[0]) { curStart = periodMatches.shift(); } else { if (curStart > 0) { curStart += 2; } break; <<<<<<< while ( ( match = this.refObj.source.formattedData.text.indexOf( this.refObj.source.formattedData.keyword, i ) ) > -1 ) { ======= //starts at 0, locates first match of the keyword. var match = this.refObj.inputs.textString.indexOf( this.refObj.inputs.keyword, i ); //runs the loop untill no more indexes are found, and match returns -1. while ( ( match ) > -1 ) { >>>>>>> //starts at 0, locates first match of the keyword. var match = this.refObj.source.formattedData.text.indexOf( this.refObj.inputs.keyword, i ); //runs the loop untill no more indexes are found, and match returns -1. while ( ( match ) > -1 ) { <<<<<<< i = match + this.refObj.source.formattedData.keyword.length; ======= //pushes location to indexMatches and increase i with the length of keyword. i = match + this.refObj.inputs.keyword.length; >>>>>>> //pushes location to indexMatches and increase i with the length of keyword. i = match + this.refObj.source.formattedData.keyword.length; <<<<<<< var replacer = new RegExp( this.refObj.source.formattedData.keyword, "ig" ); ======= //matches case insensitive and global var replacer = new RegExp( this.refObj.inputs.keyword, "ig" ); >>>>>>> //matches case insensitive and global var replacer = new RegExp( this.refObj.source.formattedData.keyword, "ig" ); <<<<<<< var replacer = this.refObj.source.formattedData.keyword.replace(" ", "[-_]"); ======= var replacer = this.refObj.inputs.keyword.replace(" ", "[-_]"); //matches case insensitive and global >>>>>>> var replacer = this.refObj.source.formattedData.keyword.replace(" ", "[-_]"); //matches case insensitive and global
<<<<<<< const collectTopicForms = require( "../researches/buildKeywordForms" ).collectForms; ======= const isEqual = require( "lodash/isEqual" ); >>>>>>> const isEqual = require( "lodash/isEqual" ); const collectTopicForms = require( "../researches/buildKeywordForms" ).collectForms; <<<<<<< /** * Check whether keyphraseForms are available. * @returns {boolean} Returns true if the Paper has keyphrase forms. */ Paper.prototype.hasKeyphraseForms = function() { return ! ( isEmpty( this._attributes.topicForms.keyphraseForms ) ); }; /** * Return the keyphrase forms or an empty array if no keyphrase forms are available. * @returns {Array} Returns Keyphrase forms */ Paper.prototype.getKeyphraseForms = function() { return this._attributes.topicForms.keyphraseForms; }; /** * Check whether synonymsForms are available. * @returns {boolean} Returns true if the Paper has synonyms forms. */ Paper.prototype.hasSynonymsForms = function() { return ! ( isEmpty( this._attributes.topicForms.synonymsForms ) ); }; /** * Return the synonyms forms or an empty array if no synonyms forms are available. * @returns {Array} Returns synonyms forms */ Paper.prototype.getSynonymsForms = function() { return this._attributes.topicForms.synonymsForms; }; /** * Check whether topicForms are available. * @returns {boolean} Returns true if the Paper has topic forms. */ Paper.prototype.hasTopicForms = function() { return ! ( isEmpty( this._attributes.topicForms ) ); }; /** * Return the topic forms or an empty object if no topic forms are available. * @returns {Object} Returns topic forms */ Paper.prototype.getTopicForms = function() { return this._attributes.topicForms; }; ======= /** * Serializes the Paper instance to an object. * * @returns {Object} The serialized Paper. */ Paper.prototype.serialize = function() { return { _parseClass: "Paper", text: this._text, ...this._attributes, }; }; /** * Checks whether the given paper has the same properties as this instance. * * @param {Paper} paper The paper to compare to. * * @returns {boolean} Whether the given paper is identical or not. */ Paper.prototype.equals = function( paper ) { return this._text === paper.getText() && isEqual( this._attributes, paper._attributes ); }; /** * Parses the object to a Paper. * * @param {Object} serialized The serialized object. * * @returns {Paper} The parsed Paper. */ Paper.parse = function( serialized ) { // _parseClass is taken here so it doesn't end up in the attributes. // eslint-disable-next-line no-unused-vars const { text, _parseClass, ...attributes } = serialized; return new Paper( text, attributes ); }; >>>>>>> /** * Check whether keyphraseForms are available. * @returns {boolean} Returns true if the Paper has keyphrase forms. */ Paper.prototype.hasKeyphraseForms = function() { return ! ( isEmpty( this._attributes.topicForms.keyphraseForms ) ); }; /** * Return the keyphrase forms or an empty array if no keyphrase forms are available. * @returns {Array} Returns Keyphrase forms */ Paper.prototype.getKeyphraseForms = function() { return this._attributes.topicForms.keyphraseForms; }; /** * Check whether synonymsForms are available. * @returns {boolean} Returns true if the Paper has synonyms forms. */ Paper.prototype.hasSynonymsForms = function() { return ! ( isEmpty( this._attributes.topicForms.synonymsForms ) ); }; /** * Return the synonyms forms or an empty array if no synonyms forms are available. * @returns {Array} Returns synonyms forms */ Paper.prototype.getSynonymsForms = function() { return this._attributes.topicForms.synonymsForms; }; /** * Check whether topicForms are available. * @returns {boolean} Returns true if the Paper has topic forms. */ Paper.prototype.hasTopicForms = function() { return ! ( isEmpty( this._attributes.topicForms ) ); }; /** * Return the topic forms or an empty object if no topic forms are available. * @returns {Object} Returns topic forms */ Paper.prototype.getTopicForms = function() { return this._attributes.topicForms; }; /* * Serializes the Paper instance to an object. * * @returns {Object} The serialized Paper. */ Paper.prototype.serialize = function() { return { _parseClass: "Paper", text: this._text, ...this._attributes, }; }; /** * Checks whether the given paper has the same properties as this instance. * * @param {Paper} paper The paper to compare to. * * @returns {boolean} Whether the given paper is identical or not. */ Paper.prototype.equals = function( paper ) { return this._text === paper.getText() && isEqual( this._attributes, paper._attributes ); }; /** * Parses the object to a Paper. * * @param {Object} serialized The serialized object. * * @returns {Paper} The parsed Paper. */ Paper.parse = function( serialized ) { // _parseClass is taken here so it doesn't end up in the attributes. // eslint-disable-next-line no-unused-vars const { text, _parseClass, ...attributes } = serialized; return new Paper( text, attributes ); };
<<<<<<< const polishParticiples = require( "../../polish/passiveVoice/participles" )(); ======= const irregularsDutch = require( "../../dutch/passiveVoice/irregulars" )(); const nlRegex1 = /^(ge|be|ont|ver|her|er)\S+(d|t)$/ig; const nlRegex2 = /^(aan|af|bij|binnen|los|mee|na|neer|om|onder|samen|terug|tegen|toe|uit|vast)(ge)\S+(d|t|n)$/ig; >>>>>>> const irregularsDutch = require( "../../dutch/passiveVoice/irregulars" )(); const nlRegex1 = /^(ge|be|ont|ver|her|er)\S+(d|t)$/ig; const nlRegex2 = /^(aan|af|bij|binnen|los|mee|na|neer|om|onder|samen|terug|tegen|toe|uit|vast)(ge)\S+(d|t|n)$/ig; const polishParticiples = require( "../../polish/passiveVoice/participles" )(); <<<<<<< case "pl": // In Polish, we only match passives from a word list. if ( includes( polishParticiples, word ) ) { matches.push( word ); } break; ======= case "nl": if ( includes( irregularsDutch, word ) ) { matches.push( word ); } break; >>>>>>> case "nl": if ( includes( irregularsDutch, word ) ) { matches.push( word ); } break; case "pl": // In Polish, we only match passives from a word list. if ( includes( polishParticiples, word ) ) { matches.push( word ); } break;
<<<<<<< let countSyllableFunction = require( "../../../src/stringProcessing/syllables/count.js" ); let forEach = require( "lodash/forEach" ); ======= let countSyllableFunction = require( "../../../js/stringProcessing/syllables/count.js" ); import { forEach } from "lodash-es"; >>>>>>> let countSyllableFunction = require( "../../../src/stringProcessing/syllables/count.js" ); import { forEach } from "lodash-es";
<<<<<<< let otherAuxiliariesInfinitive = [ "avoir", "aller", "venir", "devoir", "pouvoir", "sembler", "paraître", "paraitre", "mettre", "finir", "d'avoir", "d'aller", "n'avoir", "l'avoir" ]; ======= const otherAuxiliariesInfinitive = [ "avoir", "aller", "venir", "devoir", "pouvoir", "sembler", "paraître", "paraitre", "mettre", "finir", "d'avoir", "d'aller", "n'avoir", ]; >>>>>>> const otherAuxiliariesInfinitive = [ "avoir", "aller", "venir", "devoir", "pouvoir", "sembler", "paraître", "paraitre", "mettre", "finir", "d'avoir", "d'aller", "n'avoir", "l'avoir" ];
<<<<<<< var findKeywordInPageTitle = require( "./researches/findKeywordInPageTitle.js" ); ======= var getLinkStatistics = require( "./analyses/getLinkStatistics.js" ); var matchKeywordInSubheadings = require( "./researches/matchKeywordInSubheadings.js" ); var getKeywordDensity = require( "./researches/getKeywordDensity.js" ); >>>>>>> var findKeywordInPageTitle = require( "./researches/findKeywordInPageTitle.js" ); var matchKeywordInSubheadings = require( "./researches/matchKeywordInSubheadings.js" ); var getKeywordDensity = require( "./researches/getKeywordDensity.js" );
<<<<<<< var findTransitionWords = require( "./researches/findTransitionWords.js" ); ======= var sentenceVariation = require( "./researches/sentenceVariation.js" ); >>>>>>> var findTransitionWords = require( "./researches/findTransitionWords.js" ); var sentenceVariation = require( "./researches/sentenceVariation.js" ); <<<<<<< "getSubheadingPresence": getSubheadingPresence, "findTransitionWords": findTransitionWords ======= "getSubheadingPresence": getSubheadingPresence, "sentenceVariation": sentenceVariation >>>>>>> "getSubheadingPresence": getSubheadingPresence, "findTransitionWords": findTransitionWords, "sentenceVariation": sentenceVariation
<<<<<<< var stripSpaces = require( "./stripSpaces.js" ); var filter = require( "lodash/filter" ); ======= var forEach = require( "lodash/forEach" ); >>>>>>> var stripSpaces = require( "./stripSpaces.js" ); var filter = require( "lodash/filter" ); var forEach = require( "lodash/forEach" ); <<<<<<< sentences.map( function( sentence ) { sentence = stripSpaces( sentence ); sentencesWordCount.push( wordCount( sentence ) ); } ); ======= >>>>>>>
<<<<<<< let mockParticiple = new DutchParticiple( "gekookt", "Het werd door hem gekookt.", { auxiliaries: [ "werd" ], type: "regular", language: "nl", } ); ======= const mockParticiple = new DutchParticiple( "gekookt", "Het werd door hem gekookt.", { auxiliaries: [ "werd" ], type: "regular", language: "nl" } ); >>>>>>> const mockParticiple = new DutchParticiple( "gekookt", "Het werd door hem gekookt.", { auxiliaries: [ "werd" ], type: "regular", language: "nl", } );
<<<<<<< var getKeywordDensity = require( "./researches/getKeywordDensity.js" ); ======= var stopWordsInKeyword = require( "./researches/stopWordsInKeyword" ); var stopWordsInUrl = require( "./researches/stopWordsInUrl" ); >>>>>>> var getKeywordDensity = require( "./researches/getKeywordDensity.js" ); var stopWordsInKeyword = require( "./researches/stopWordsInKeyword" ); var stopWordsInUrl = require( "./researches/stopWordsInUrl" ); <<<<<<< "getKeywordDensity": getKeywordDensity, "metaDescriptionLength": metaDescriptionLength ======= "stopWordsInKeyword": stopWordsInKeyword, "stopWordsInUrl": stopWordsInUrl, "metaDescriptionLength": metaDescriptionLength, "keyphraseLength": keyphraseLength >>>>>>> "getKeywordDensity": getKeywordDensity, "stopWordsInKeyword": stopWordsInKeyword, "stopWordsInUrl": stopWordsInUrl, "metaDescriptionLength": metaDescriptionLength, "keyphraseLength": keyphraseLength
<<<<<<< var paragraphTooLong = require( "./assessments/paragraphTooLongAssessment.js" ); var paragraphTooShort = require( "./assessments/paragraphTooShortAssessment.js" ); ======= var sentenceLengthInText = require( "./assessments/sentenceLengthInTextAssessment.js" ); var sentenceLengthInDescription = require( "./assessments/sentenceLengthInDescriptionAssessment.js" ); >>>>>>> var paragraphTooLong = require( "./assessments/paragraphTooLongAssessment.js" ); var paragraphTooShort = require( "./assessments/paragraphTooShortAssessment.js" ); var sentenceLengthInText = require( "./assessments/sentenceLengthInTextAssessment.js" ); var sentenceLengthInDescription = require( "./assessments/sentenceLengthInDescriptionAssessment.js" ); <<<<<<< fleschReadingEase: fleschReadingEase, paragraphTooLong: paragraphTooLong, paragraphTooShort: paragraphTooShort, subHeadingLength: subHeadingLength, subheadingPresence: subheadingPresence ======= fleschReadingEase: fleschReadingEase, sentenceLengthInText: sentenceLengthInText, sentenceLengthInDescription: sentenceLengthInDescription, subHeadingLength: subHeadingLength, subheadingPresence: subheadingPresence >>>>>>> fleschReadingEase: fleschReadingEase, paragraphTooLong: paragraphTooLong, paragraphTooShort: paragraphTooShort, subHeadingLength: subHeadingLength, subheadingPresence: subheadingPresence, sentenceLengthInText: sentenceLengthInText, sentenceLengthInDescription: sentenceLengthInDescription
<<<<<<< var calculateFleschReading = require( "./researches/calculateFleschReading" ); var getKeywordDensity = require( "./researches/getKeywordDensity.js" ); ======= var calculateFleschReading = require( "./researches/calculateFleschReading.js" ); var metaDescriptionLength = require( "./researches/metaDescriptionLength.js" ); >>>>>>> var getKeywordDensity = require( "./researches/getKeywordDensity.js" ); var calculateFleschReading = require( "./researches/calculateFleschReading.js" ); var metaDescriptionLength = require( "./researches/metaDescriptionLength.js" ); <<<<<<< "getLinkStatistics": getLinkStatistics, "getKeywordDensity": getKeywordDensity ======= "getLinkStatistics": getLinkStatistics, "metaDescriptionLength": metaDescriptionLength >>>>>>> "getLinkStatistics": getLinkStatistics, "getKeywordDensity": getKeywordDensity, "metaDescriptionLength": metaDescriptionLength
<<<<<<< assessments.pageTitleKeyword = require( "./assessments/pageTitleKeyword.js" ); ======= assessments.subHeadings = require( "./assessments/matchKeywordInSubheading.js" ); assessments.keywordDensity = require( "./assessments/keywordDensity.js" ); >>>>>>> assessments.pageTitleKeyword = require( "./assessments/pageTitleKeyword.js" ); assessments.subHeadings = require( "./assessments/matchKeywordInSubheading.js" ); assessments.keywordDensity = require( "./assessments/keywordDensity.js" );
<<<<<<< expect( firstParagraph( "<p>this is a kapaklı</p>", "kapaklı" ) ).toBe( 1 ); ======= expect( firstParagraph( "<p>this is a key-word</p>", "key-word" ) ).toBe( 1 ); expect( firstParagraph( "<p>this is a key-word</p>", "key_word" ) ).toBe( 0 ); expect( firstParagraph( "<p>this is a key_word</p>", "key_word" ) ).toBe( 1 ); expect( firstParagraph( "<p>this is a key_word</p>", "key word" ) ).toBe( 0 ); >>>>>>> expect( firstParagraph( "<p>this is a kapaklı</p>", "kapaklı" ) ).toBe( 1 ); expect( firstParagraph( "<p>this is a key-word</p>", "key-word" ) ).toBe( 1 ); expect( firstParagraph( "<p>this is a key-word</p>", "key_word" ) ).toBe( 0 ); expect( firstParagraph( "<p>this is a key_word</p>", "key_word" ) ).toBe( 1 ); expect( firstParagraph( "<p>this is a key_word</p>", "key word" ) ).toBe( 0 );
<<<<<<< var findKeywordInPageTitle = require( "./analyses/findKeywordInPageTitle.js" ); ======= var getLinkStatistics = require( "./analyses/getLinkStatistics.js" ); >>>>>>> var findKeywordInPageTitle = require( "./analyses/findKeywordInPageTitle.js" ); var getLinkStatistics = require( "./analyses/getLinkStatistics.js" ); <<<<<<< "wordCountInText": wordCountInText, "findKeywordInPageTitle": findKeywordInPageTitle ======= "wordCountInText": wordCountInText, "getLinkStatistics": getLinkStatistics >>>>>>> "wordCountInText": wordCountInText, "findKeywordInPageTitle": findKeywordInPageTitle, "getLinkStatistics": getLinkStatistics
<<<<<<< /* global YoastSEO: true */ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO; var isUndefined = require( "lodash/lang/isUndefined" ); var forEach = require( "lodash/collection/forEach" ); var reduce = require( "lodash/collection/reduce" ); ======= >>>>>>> var isUndefined = require( "lodash/lang/isUndefined" ); var forEach = require( "lodash/collection/forEach" ); var reduce = require( "lodash/collection/reduce" ); <<<<<<< YoastSEO.Pluggable.prototype._pollLoadingPlugins = function( pollTime ) { pollTime = isUndefined( pollTime ) ? 0 : pollTime; ======= Pluggable.prototype._pollLoadingPlugins = function( pollTime ) { pollTime = pollTime === undefined ? 0 : pollTime; >>>>>>> Pluggable.prototype._pollLoadingPlugins = function( pollTime ) { pollTime = isUndefined( pollTime ) ? 0 : pollTime; <<<<<<< YoastSEO.Pluggable.prototype._allReady = function() { return reduce( this.plugins, function( allReady, plugin ) { return allReady && plugin.status === "ready"; }, true ); ======= Pluggable.prototype._allReady = function() { for ( var plugin in this.plugins ) { if ( this.plugins[plugin].status !== "ready" ) { return false; } } return true; >>>>>>> Pluggable.prototype._allReady = function() { return reduce( this.plugins, function( allReady, plugin ) { return allReady && plugin.status === "ready"; }, true ); <<<<<<< YoastSEO.Pluggable.prototype._pollTimeExceeded = function() { forEach ( this.plugins, function( plugin, pluginName ) { if ( !isUndefined( plugin.options ) && plugin.options.status !== "ready" ) { console.error( "Error: Plugin " + pluginName + ". did not finish loading in time." ); delete this.plugins[pluginName]; ======= Pluggable.prototype._pollTimeExceeded = function() { for ( var plugin in this.plugins ) { if ( this.plugins[plugin].options !== undefined && this.plugins[plugin].options.status !== "ready" ) { console.error( "Error: Plugin " + plugin + ". did not finish loading in time." ); delete this.plugins[plugin]; >>>>>>> Pluggable.prototype._pollTimeExceeded = function() { forEach ( this.plugins, function( plugin, pluginName ) { if ( !isUndefined( plugin.options ) && plugin.options.status !== "ready" ) { console.error( "Error: Plugin " + pluginName + ". did not finish loading in time." ); delete this.plugins[pluginName]; <<<<<<< YoastSEO.Pluggable.prototype._stripIllegalModifications = function( callChain ) { forEach ( callChain, function( callableObject, index ) { if ( this._validateOrigin( callableObject.origin ) === false ) { delete callChain[index]; ======= Pluggable.prototype._stripIllegalModifications = function( callChain ) { for ( var callableObject in callChain ) { if ( this._validateOrigin( callChain[callableObject].origin ) === false ) { delete callChain[callableObject]; >>>>>>> Pluggable.prototype._stripIllegalModifications = function( callChain ) { forEach ( callChain, function( callableObject, index ) { if ( this._validateOrigin( callableObject.origin ) === false ) { delete callChain[index]; <<<<<<< YoastSEO.Pluggable.prototype._validateUniqueness = function( pluginName ) { if ( !isUndefined( this.plugins[pluginName] ) ) { ======= Pluggable.prototype._validateUniqueness = function( pluginName ) { if ( this.plugins[pluginName] !== undefined ) { >>>>>>> Pluggable.prototype._validateUniqueness = function( pluginName ) { if ( !isUndefined( this.plugins[pluginName] ) ) {
<<<<<<< let mockParticiple = new SpanishParticiple( "sentido", "fue un sentido monumental y grandilocuente.", { auxiliaries: [ "fue" ], type: "irregular", language: "es", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( false ); ======= const mockParticiple = new SpanishParticiple( "sentido", "fue un sentido monumental y grandilocuente.", { auxiliaries: [ "fue" ], type: "irregular", language: "es" } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, 7, "es" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, 7, "es" ) ).toBe( false ); >>>>>>> const mockParticiple = new SpanishParticiple( "sentido", "fue un sentido monumental y grandilocuente.", { auxiliaries: [ "fue" ], type: "irregular", language: "es", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( true ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( false ); <<<<<<< let mockParticiple = new SpanishParticiple( "armados", "eran casi en su totalidad exsamuráis y estaban armados", { auxiliaries: [ "eran" ], type: "irregular", language: "es", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( false ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( true ); ======= const mockParticiple = new SpanishParticiple( "armados", "eran casi en su totalidad exsamuráis y estaban armados", { auxiliaries: [ "eran" ], type: "irregular", language: "es" } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, 47, "es" ) ).toBe( false ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, 47, "es" ) ).toBe( true ); >>>>>>> const mockParticiple = new SpanishParticiple( "armados", "eran casi en su totalidad exsamuráis y estaban armados", { auxiliaries: [ "eran" ], type: "irregular", language: "es", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( false ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( true ); <<<<<<< let mockParticiple = new SpanishParticiple( "esperado", "son famosos estaban en un programa de televisión muy esperado.", { auxiliaries: [ "son" ], type: "irregular", language: "es", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( false ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( true ); ======= const mockParticiple = new SpanishParticiple( "esperado", "son famosos estaban en un programa de televisión muy esperado.", { auxiliaries: [ "son" ], type: "irregular", language: "es" } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, 53, "es" ) ).toBe( false ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, 53, "es" ) ).toBe( true ); >>>>>>> const mockParticiple = new SpanishParticiple( "esperado", "son famosos estaban en un programa de televisión muy esperado.", { auxiliaries: [ "son" ], type: "irregular", language: "es", } ); expect( mockParticiple.directPrecedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( false ); expect( mockParticiple.precedenceException( mockParticiple._sentencePart, mockParticiple._participle, "es" ) ).toBe( true ); <<<<<<< let mockParticiple = new SpanishParticiple( "escrito", "fue escrito por mi amiga.", { auxiliaries: [ "fue" ], type: "regular", language: "es", } ); ======= const mockParticiple = new SpanishParticiple( "escrito", "fue escrito por mi amiga.", { auxiliaries: [ "fue" ], type: "regular", language: "es" } ); >>>>>>> const mockParticiple = new SpanishParticiple( "escrito", "fue escrito por mi amiga.", { auxiliaries: [ "fue" ], type: "regular", language: "es", } );
<<<<<<< // Polish papers import polishPaper1 from "./pl/polishPaper1"; import polishPaper2 from "./pl/polishPaper2"; import polishPaper3 from "./pl/polishPaper3"; ======= // Russian papers import russianPaper1 from "./ru/russianPaper1"; import russianPaper2 from "./ru/russianPaper2"; import russianPaper3 from "./ru/russianPaper3"; >>>>>>> // Polish papers import polishPaper1 from "./pl/polishPaper1"; import polishPaper2 from "./pl/polishPaper2"; import polishPaper3 from "./pl/polishPaper3"; // Russian papers import russianPaper1 from "./ru/russianPaper1"; import russianPaper2 from "./ru/russianPaper2"; import russianPaper3 from "./ru/russianPaper3"; <<<<<<< polishPaper1, polishPaper2, polishPaper3, ======= russianPaper1, russianPaper2, russianPaper3, >>>>>>> polishPaper1, polishPaper2, polishPaper3, russianPaper1, russianPaper2, russianPaper3,
<<<<<<< const matchTextWithArray = require( "../stringProcessing/matchTextWithArray.js" ); const buildKeywordForms = require( "./buildKeywordForms.js" ); const map = require( "lodash/map" ); const toLower = require( "lodash/toLower" ); ======= const wordMatch = require( "../stringProcessing/matchTextWithWord.js" ); const normalizeQuotes = require( "../stringProcessing/quotes.js" ).normalize; const escapeRegExp = require( "lodash/escapeRegExp" ); >>>>>>> const matchTextWithArray = require( "../stringProcessing/matchTextWithArray.js" ); const normalizeQuotes = require( "../stringProcessing/quotes.js" ).normalize; const buildKeywordForms = require( "./buildKeywordForms.js" ); const map = require( "lodash/map" ); const toLower = require( "lodash/toLower" ); <<<<<<< const title = paper.getTitle(); const keywordForms = buildKeywordForms( paper ); let result = { matches: 0, position: -1 }; result.matches = matchTextWithArray( title, keywordForms ).length; let positions = []; const titleLowerCase = title.toLocaleLowerCase(); const keywordFormsLowerCase = map( keywordForms, function( form ) { return toLower( form ); } ); keywordFormsLowerCase.forEach( function( form ) { const keywordFormIndex = titleLowerCase.indexOf( form ); if ( keywordFormIndex > -1 ) { positions = positions.concat( keywordFormIndex ); } } ); result.position = Math.min( ... positions ); ======= /* * NormalizeQuotes also is used in wordMatch, but in order to find the index of the keyword, it's * necessary to repeat it here. */ const title = normalizeQuotes( paper.getTitle() ); const keyword = escapeRegExp( normalizeQuotes( paper.getKeyword() ).toLocaleLowerCase() ); const locale = paper.getLocale(); const result = { matches: 0, position: -1 }; result.matches = wordMatch( title, keyword, locale ); result.position = title.toLocaleLowerCase().indexOf( keyword ); >>>>>>> const title = normalizeQuotes( paper.getTitle() ); const keywordForms = buildKeywordForms( paper ); let result = { matches: 0, position: -1 }; result.matches = matchTextWithArray( title, keywordForms ).length; let positions = []; const titleLowerCase = title.toLocaleLowerCase(); const keywordFormsLowerCase = map( keywordForms, function( form ) { return toLower( form ); } ); keywordFormsLowerCase.forEach( function( form ) { const keywordFormIndex = titleLowerCase.indexOf( form ); if ( keywordFormIndex > -1 ) { positions = positions.concat( keywordFormIndex ); } } ); result.position = Math.min( ... positions );
<<<<<<< ======= http: { maxRequestSize: '1MB' }, maxRequestHistorySize: 50, >>>>>>> maxRequestHistorySize: 50,
<<<<<<< /* global YoastSEO: true */ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO; var calculateFleschReading = require( "./analyses/calculateFleschReading.js" ); var checkStringForStopwords = require( "./analyses/checkStringForStopwords.js" ); var checkUrlForStopwords = require( "./analyses/checkUrlForStopwords.js" ); var checkForKeywordInUrl = require( "./analyses/countKeywordInUrl.js" ); var checkForKeywordDoubles = require( "./analyses/checkForKeywordDoubles.js" ); var findKeywordInFirstParagraph = require( "./analyses/findKeywordInFirstParagraph.js" ); var findKeywordInPageTitle = require( "./analyses/findKeywordInPageTitle.js" ); var getKeywordDensity = require( "./analyses/getKeywordDensity.js" ); var countImages = require( "./analyses/getImageStatistics.js" ); var countLinks = require( "./analyses/getLinkStatistics.js" ); var getKeyphraseLength = require( "./analyses/getWordCount.js" ); var isUrlTooLong = require( "./analyses/isUrlTooLong.js" ); var getSubheadings = require( "./analyses/matchKeywordInSubheadings.js" ); var countWords = require( "./stringProcessing/countWords.js" ); var matchTextWithWord = require( "./stringProcessing/matchTextWithWord.js" ); ======= >>>>>>> /* global YoastSEO: true */ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO; var calculateFleschReading = require( "./analyses/calculateFleschReading.js" ); var checkStringForStopwords = require( "./analyses/checkStringForStopwords.js" ); var checkUrlForStopwords = require( "./analyses/checkUrlForStopwords.js" ); var checkForKeywordInUrl = require( "./analyses/countKeywordInUrl.js" ); var checkForKeywordDoubles = require( "./analyses/checkForKeywordDoubles.js" ); var findKeywordInFirstParagraph = require( "./analyses/findKeywordInFirstParagraph.js" ); var findKeywordInPageTitle = require( "./analyses/findKeywordInPageTitle.js" ); var getKeywordDensity = require( "./analyses/getKeywordDensity.js" ); var countImages = require( "./analyses/getImageStatistics.js" ); var countLinks = require( "./analyses/getLinkStatistics.js" ); var getKeyphraseLength = require( "./analyses/getWordCount.js" ); var isUrlTooLong = require( "./analyses/isUrlTooLong.js" ); var getSubheadings = require( "./analyses/matchKeywordInSubheadings.js" ); var countWords = require( "./stringProcessing/countWords.js" ); var matchTextWithWord = require( "./stringProcessing/matchTextWithWord.js" ); <<<<<<< YoastSEO.Analyzer.prototype.wordCount = function() { ======= Analyzer.prototype.wordCount = function() { var countWords = require( "./stringProcessing/countWords.js" ); >>>>>>> Analyzer.prototype.wordCount = function() { <<<<<<< YoastSEO.Analyzer.prototype.keyphraseSizeCheck = function() { return [ { test: "keyphraseSizeCheck", result: getKeyphraseLength( this.config.keyword ) } ]; ======= Analyzer.prototype.keyphraseSizeCheck = function() { var getKeyphraseLength = require( "./analyses/getWordCount.js" ); return [ { test: "keyphraseSizeCheck", result: getKeyphraseLength( this.paper.getKeyword() ) } ]; >>>>>>> Analyzer.prototype.keyphraseSizeCheck = function() { return [ { test: "keyphraseSizeCheck", result: getKeyphraseLength( this.paper.getKeyword() ) } ]; <<<<<<< YoastSEO.Analyzer.prototype.keywordDensity = function() { ======= Analyzer.prototype.keywordDensity = function() { var matchWords = require( "./stringProcessing/matchTextWithWord.js" ); var countWords = require( "./stringProcessing/countWords.js" ); var getKeywordDensity = require( "./analyses/getKeywordDensity.js" ); >>>>>>> Analyzer.prototype.keywordDensity = function() { <<<<<<< this.__store.keywordCount = matchTextWithWord( this.config.text, this.config.keyword ); ======= this.__store.keywordCount = matchWords( this.config.text, this.paper.getKeyword() ); >>>>>>> this.__store.keywordCount = matchTextWithWord( this.config.text, this.paper.getKeyword() ); <<<<<<< YoastSEO.Analyzer.prototype.keywordCount = function() { return matchTextWithWord( this.config.text, this.config.keyword ); ======= Analyzer.prototype.keywordCount = function() { var matchTextWithWord = require( "./stringProcessing/matchTextWithWord.js" ); var keywordCount = matchTextWithWord( this.config.text, this.paper.getKeyword() ); return keywordCount; >>>>>>> Analyzer.prototype.keywordCount = function() { return matchTextWithWord( this.config.text, this.paper.getKeyword() ); <<<<<<< YoastSEO.Analyzer.prototype.subHeadings = function() { return [ { test: "subHeadings", result: getSubheadings( this.config.text, this.config.keyword ) } ]; ======= Analyzer.prototype.subHeadings = function() { var getSubheadings = require( "./analyses/matchKeywordInSubheadings.js" ); var result = [ { test: "subHeadings", result: getSubheadings( this.config.text, this.paper.getKeyword() ) } ]; return result; >>>>>>> Analyzer.prototype.subHeadings = function() { return [ { test: "subHeadings", result: getSubheadings( this.config.text, this.paper.getKeyword() ) } ]; <<<<<<< YoastSEO.Analyzer.prototype.stopwords = function() { var matches = checkStringForStopwords( this.config.keyword ); ======= Analyzer.prototype.stopwords = function() { var checkStringForStopwords = require( "./analyses/checkStringForStopwords.js" ); var matches = checkStringForStopwords( this.paper.getKeyword() ); >>>>>>> Analyzer.prototype.stopwords = function() { var matches = checkStringForStopwords( this.paper.getKeyword() ); <<<<<<< YoastSEO.Analyzer.prototype.fleschReading = function() { ======= Analyzer.prototype.fleschReading = function() { var calculateFleschReading = require( "./analyses/calculateFleschReading.js" ); >>>>>>> Analyzer.prototype.fleschReading = function() { <<<<<<< YoastSEO.Analyzer.prototype.linkCount = function() { var keyword = this.config.keyword; ======= Analyzer.prototype.linkCount = function() { var countLinks = require( "./analyses/getLinkStatistics.js" ); var keyword = this.paper.getKeyword(); >>>>>>> Analyzer.prototype.linkCount = function() { var keyword = this.paper.getKeyword(); <<<<<<< YoastSEO.Analyzer.prototype.imageCount = function() { return [ { test: "imageCount", result: countImages( this.config.text, this.config.keyword ) } ]; ======= Analyzer.prototype.imageCount = function() { var countImages = require( "./analyses/getImageStatistics.js" ); return [ { test: "imageCount", result: countImages( this.config.text, this.paper.getKeyword() ) } ]; >>>>>>> Analyzer.prototype.imageCount = function() { return [ { test: "imageCount", result: countImages( this.config.text, this.paper.getKeyword() ) } ]; <<<<<<< YoastSEO.Analyzer.prototype.pageTitleKeyword = function() { ======= Analyzer.prototype.pageTitleKeyword = function() { var findKeywordInPageTitle = require( "./analyses/findKeywordInPageTitle.js" ); >>>>>>> Analyzer.prototype.pageTitleKeyword = function() { <<<<<<< YoastSEO.Analyzer.prototype.firstParagraph = function() { return [ { test: "firstParagraph", result: findKeywordInFirstParagraph( this.config.text, this.config.keyword ) } ]; ======= Analyzer.prototype.firstParagraph = function() { var findKeywordInFirstParagraph = require( "./analyses/findKeywordInFirstParagraph.js" ); var result = [ { test: "firstParagraph", result: findKeywordInFirstParagraph( this.config.text, this.paper.getKeyword() ) } ]; return result; >>>>>>> Analyzer.prototype.firstParagraph = function() { return [ { test: "firstParagraph", result: findKeywordInFirstParagraph( this.config.text, this.paper.getKeyword() ) } ]; <<<<<<< YoastSEO.Analyzer.prototype.metaDescriptionKeyword = function() { ======= Analyzer.prototype.metaDescriptionKeyword = function() { var wordMatch = require( "./stringProcessing/matchTextWithWord.js" ); >>>>>>> Analyzer.prototype.metaDescriptionKeyword = function() { <<<<<<< if ( typeof this.config.meta !== "undefined" && typeof this.config.keyword !== "undefined" && this.config.meta !== "" && this.config.keyword !== "" ) { result[ 0 ].result = matchTextWithWord( this.config.meta, this.config.keyword ); ======= if ( typeof this.config.meta !== "undefined" && this.config.meta !== "" && this.paper.hasKeyword() ) { result[ 0 ].result = wordMatch( this.config.meta, this.paper.getKeyword() ); >>>>>>> if ( typeof this.config.meta !== "undefined" && this.config.meta !== "" && this.paper.hasKeyword() ) { result[ 0 ].result = matchTextWithWord( this.config.meta, this.paper.getKeyword() ); <<<<<<< YoastSEO.Analyzer.prototype.urlKeyword = function() { ======= Analyzer.prototype.urlKeyword = function() { var checkForKeywordInUrl = require( "./analyses/countKeywordInUrl.js" ); >>>>>>> Analyzer.prototype.urlKeyword = function() { <<<<<<< YoastSEO.Analyzer.prototype.urlLength = function() { ======= Analyzer.prototype.urlLength = function() { var isUrlTooLong = require( "./analyses/isUrlTooLong.js" ); >>>>>>> Analyzer.prototype.urlLength = function() { <<<<<<< YoastSEO.Analyzer.prototype.urlStopwords = function() { return [ { test: "urlStopwords", result: checkUrlForStopwords( this.config.url ) } ]; ======= Analyzer.prototype.urlStopwords = function() { var checkUrlForStopwords = require( "./analyses/checkUrlForStopwords.js" ); var result = [ { test: "urlStopwords", result: checkUrlForStopwords( this.config.url ) } ]; return result; >>>>>>> Analyzer.prototype.urlStopwords = function() { return [ { test: "urlStopwords", result: checkUrlForStopwords( this.config.url ) } ]; <<<<<<< if ( typeof this.config.keyword !== "undefined" && typeof this.config.usedKeywords !== "undefined" ) { result[0].result = checkForKeywordDoubles( this.config.keyword, this.config.usedKeywords ); ======= if ( this.paper.hasKeyword() && typeof this.config.usedKeywords !== "undefined" ) { var checkForKeywordDoubles = require( "./analyses/checkForKeywordDoubles.js" ); result[0].result = checkForKeywordDoubles( this.paper.getKeyword(), this.config.usedKeywords ); >>>>>>> if ( this.paper.hasKeyword() && typeof this.config.usedKeywords !== "undefined" ) { result[0].result = checkForKeywordDoubles( this.paper.getKeyword(), this.config.usedKeywords );
<<<<<<< assessments.fleschReading = require( "./assessments/calculateFleschReading.js" ); ======= assessments.linkCount = require( "./assessments/getLinkStatistics.js" ); >>>>>>> assessments.fleschReading = require( "./assessments/calculateFleschReading.js" ); assessments.linkCount = require( "./assessments/getLinkStatistics.js" );
<<<<<<< var matchTextWithWord = require( "./stringProcessing/matchTextWithWord.js" ); var keywordCount = matchTextWithWord( this.config.text, this.config.keyword ); ======= var keywordMatches = this.preProcessor.__store.cleanTextSomeTags.match( this.keywordRegex ); var keywordCount = 0; if ( keywordMatches !== null ) { keywordCount = keywordMatches.length; } this.__store.keywordCount = keywordCount; >>>>>>> var matchTextWithWord = require( "stringProcessing/matchTextWithWord.js" ); var keywordCount = matchTextWithWord( this.config.text, this.config.keyword ); <<<<<<< var checkStringForStopwords = require( "./analyses/checkStringForStopwords.js" ); var matches = checkStringForStopwords( this.config.keyword ); /* Matchestext is used for scoring, we should move this to the scoring */ ======= var keyword = this.config.keyword; var stopWord, stopWordCount = 0; >>>>>>> var checkStringForStopwords = require( "analyses/checkStringForStopwords.js" ); var matches = checkStringForStopwords( this.config.keyword ); /* Matchestext is used for scoring, we should move this to the scoring */ <<<<<<< count: matches.length, ======= count: stopWordCount, >>>>>>> count: matches.length, <<<<<<< var countImages = require( "./analyses/getImageStatistics.js" ); return [ { test: "imageCount", result: countImages( this.config.text, this.config.keyword ) } ]; ======= var imageCount = { total: 0, alt: 0, noAlt: 0, altKeyword: 0, altNaKeyword: 0 }; //matches everything in the <img>-tag, case insensitive and global var imageMatches = this.preProcessor.__store.originalText.match( /<img(?:[^>]+)?>/ig ); if ( imageMatches !== null ) { imageCount.total = imageMatches.length; for ( var i = 0; i < imageMatches.length; i++ ) { //matches everything in the alt attribute, case insensitive and global. var alttag = imageMatches[ i ].match( /alt=([\'\"])(.*?)\1/ig ); if ( this.imageAlttag( alttag ) ) { if ( this.config.keyword !== "" ) { if ( this.imageAlttagKeyword( alttag ) ) { imageCount.altKeyword++; } else { //this counts all alt-tags w/o the keyword when a keyword is set. imageCount.alt++; } } else { imageCount.altNaKeyword++; } } else { imageCount.noAlt++; } } } return [ { test: "imageCount", result: imageCount } ]; }; /** * checks if the alttag contains any text. * @param image * @returns {boolean} */ YoastSEO.Analyzer.prototype.imageAlttag = function( image ) { var hasAlttag = false; if ( image !== null ) { var alt = image[ 0 ].split( "=" )[ 1 ]; //Checks if the alttag of the given image isn't empty after whitespaces are removed. if ( alt !== null && this.stringHelper.stripSpaces( alt.replace( /[\'\"]*/g, "" ) ) !== "" ) { hasAlttag = true; } } return hasAlttag; }; /** * checks if the alttag matches the keyword * @param image * @returns {boolean} */ YoastSEO.Analyzer.prototype.imageAlttagKeyword = function( image ) { var hasKeyword = false; if ( image !== null ) { if ( this.preProcessor.replaceDiacritics( image[ 0 ] ).match( this.keywordRegex ) !== null ) { hasKeyword = true; } } return hasKeyword; >>>>>>> var countImages = require( "analyses/getImageStatistics.js" ); return [ { test: "imageCount", result: countImages( this.config.text, this.config.keyword ) } ]; <<<<<<< var findKeywordInPageTitle = require ( "./analyses/findKeywordInPageTitle.js" ); var result = [ { test: "pageTitleKeyword", result: { position: -1, matches: 0 } } ]; if ( typeof this.config.pageTitle !== "undefined" && typeof this.config.keyword !== "undefined" ) { result[0].result = findKeywordInPageTitle( this.config.pageTitle, this.config.keyword ); ======= var result = [ { test: "pageTitleKeyword", result: { matches: 0, position: 0 } } ]; if ( typeof this.config.pageTitle !== "undefined" ) { result[ 0 ].result.matches = this.stringHelper.countMatches( this.config.pageTitle, this.stringHelper.getWordBoundaryRegex( this.config.keyword ) ); result[ 0 ].result.position = this.config.pageTitle.toLocaleLowerCase().indexOf( this.config.keyword.toLocaleLowerCase() ); >>>>>>> var findKeywordInPageTitle = require( "analyses/findKeywordInPageTitle.js" ); var result = [ { test: "pageTitleKeyword", result: { position: -1, matches: 0 } } ]; if ( typeof this.config.pageTitle !== "undefined" && typeof this.config.keyword !== "undefined" ) { result[0].result = findKeywordInPageTitle( this.config.pageTitle, this.config.keyword ); <<<<<<< if ( typeof this.config.meta !== "undefined" && typeof this.config.keyword !== "undefined" && this.config.meta !== "" && this.config.keyword !== "" ) { result[ 0 ].result = wordMatch( this.config.meta, this.config.keyword ); ======= if ( typeof this.config.meta !== "undefined" && this.config.meta.length > 0 && this.config.keyword !== "" ) { result[ 0 ].result = this.stringHelper.countMatches( this.config.meta, this.stringHelper.getWordBoundaryRegex( this.config.keyword ) ); >>>>>>> if ( typeof this.config.meta !== "undefined" && typeof this.config.keyword !== "undefined" && this.config.meta !== "" && this.config.keyword !== "" ) { result[ 0 ].result = wordMatch( this.config.meta, this.config.keyword ); <<<<<<< ;/* global YoastSEO: true */ ======= /* global YoastSEO: true */ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO; >>>>>>> /* global YoastSEO: true */ <<<<<<< module.exports = YoastSEO.AnalyzeScorer; ;/* jshint browser: true */ ======= /* jshint browser: true */ >>>>>>> module.exports = YoastSEO.AnalyzeScorer; /* jshint browser: true */
<<<<<<< .then( data => { console.log( "analysis done!", data ); this.props.setResults( { readability: data.readability.results, seo: data.seo.results, } ); } ); ======= .then( data => { this.props.actions.setResults( { readability: data.results, } ); } ); } /** * Runs analysis on the full-text test papers. * * @returns {void} */ analyzeSpam() { for ( let i = 0; i < 10; i++ ) { testPapers.forEach( ( { paper: paper } ) => { this.analyze( { text: paper._text, ...paper._attributes, } ); } ); } >>>>>>> .then( data => { console.log( "analysis done!", data ); this.props.actions.setResults( { readability: data.readability.results, seo: data.seo.results, } ); } ); } /** * Runs analysis on the full-text test papers. * * @returns {void} */ analyzeSpam() { for ( let i = 0; i < 10; i++ ) { testPapers.forEach( ( { paper: paper } ) => { this.analyze( { text: paper._text, ...paper._attributes, } ); } ); }
<<<<<<< let mockParticiple = new EnglishParticiple( "rid", "He wants to get rid of it", { auxiliaries: [ "get" ], type: "irregular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "rid", "He wants to get rid of it", { auxiliaries: [ "get" ], type: "irregular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "rid", "He wants to get rid of it", { auxiliaries: [ "get" ], type: "irregular", language: "en", } ); <<<<<<< let mockParticiple = new EnglishParticiple( "read", "I am wiser for having read that book", { auxiliaries: [ "am" ], type: "irregular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "read", "I am wiser for having read that book", { auxiliaries: [ "am" ], type: "irregular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "read", "I am wiser for having read that book", { auxiliaries: [ "am" ], type: "irregular", language: "en", } ); <<<<<<< let mockParticiple = new EnglishParticiple( "painted", "He was having his house painted", { auxiliaries: [ "was" ], type: "regular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "painted", "He was having his house painted", { auxiliaries: [ "was" ], type: "regular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "painted", "He was having his house painted", { auxiliaries: [ "was" ], type: "regular", language: "en", } ); <<<<<<< let mockParticiple = new EnglishParticiple( "fit", "The data was then fit by the optimal model", { auxiliaries: [ "was" ], type: "irregular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "fit", "The data was then fit by the optimal model", { auxiliaries: [ "was" ], type: "irregular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "fit", "The data was then fit by the optimal model", { auxiliaries: [ "was" ], type: "irregular", language: "en", } ); <<<<<<< let mockParticiple = new EnglishParticiple( "enjoyed", "It's something I've always enjoyed doing", { auxiliaries: [ "it's" ], type: "regular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "enjoyed", "It's something I've always enjoyed doing", { auxiliaries: [ "it's" ], type: "regular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "enjoyed", "It's something I've always enjoyed doing", { auxiliaries: [ "it's" ], type: "regular", language: "en", } ); <<<<<<< let mockParticiple = new EnglishParticiple( "adopted", "Here is a list of ten beliefs I have adopted", { auxiliaries: [ "is" ], type: "regular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "adopted", "Here is a list of ten beliefs I have adopted", { auxiliaries: [ "is" ], type: "regular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "adopted", "Here is a list of ten beliefs I have adopted", { auxiliaries: [ "is" ], type: "regular", language: "en", } ); <<<<<<< let mockParticiple = new EnglishParticiple( "stolen", "The money was stolen, but nobody has been able to prove it", { auxiliaries: [ "was" ], type: "irregular", language: "en", } ); ======= const mockParticiple = new EnglishParticiple( "stolen", "The money was stolen, but nobody has been able to prove it", { auxiliaries: [ "was" ], type: "irregular", language: "en" } ); >>>>>>> const mockParticiple = new EnglishParticiple( "stolen", "The money was stolen, but nobody has been able to prove it", { auxiliaries: [ "was" ], type: "irregular", language: "en", } );
<<<<<<< expect( assessment.getText() ).toEqual ( "0% of the sentences contain more than 20 words, which is less than or equal to the recommended maximum of 25%." ); ======= expect( assessment.getText() ).toEqual ( "0% of the sentences contain more than 20 words, which is less than the recommended maximum of 25%." ); expect( assessment.hasMarks() ).toBe( false ); >>>>>>> expect( assessment.getText() ).toEqual ( "0% of the sentences contain more than 20 words, which is less than or equal to the recommended maximum of 25%." ); expect( assessment.hasMarks() ).toBe( false ); <<<<<<< expect( assessment.getText() ).toEqual ( "25% of the sentences contain more than 20 words, which is less than or equal to the recommended maximum of 25%." ); ======= expect( assessment.getText() ).toEqual ( "25% of the sentences contain more than 20 words, which is less than the recommended maximum of 25%." ); expect( assessment.hasMarks() ).toBe( true ); >>>>>>> expect( assessment.getText() ).toEqual ( "25% of the sentences contain more than 20 words, which is less than or equal to the recommended maximum of 25%." ); expect( assessment.hasMarks() ).toBe( true );
<<<<<<< var wordCountInText = require( "./researches/wordCountInText.js" ); var getLinkStatistics = require( "./researches/getLinkStatistics.js" ); var linkCount = require( "./researches/countLinks.js" ); var getLinks = require( "./researches/getLinks.js" ); var urlLength = require( "./researches/urlIsTooLong.js" ); var findKeywordInPageTitle = require( "./researches/findKeywordInPageTitle.js" ); var matchKeywordInSubheadings = require( "./researches/matchKeywordInSubheadings.js" ); const getKeywordDensity = require( "./researches/getKeywordDensity.js" ); const keywordCount = require( "./researches/keywordCount" ); var stopWordsInKeyword = require( "./researches/stopWordsInKeyword" ); var stopWordsInUrl = require( "./researches/stopWordsInUrl" ); var calculateFleschReading = require( "./researches/calculateFleschReading.js" ); var metaDescriptionLength = require( "./researches/metaDescriptionLength.js" ); var imageCount = require( "./researches/imageCountInText.js" ); var altTagCount = require( "./researches/imageAltTags.js" ); var keyphraseLength = require( "./researches/keyphraseLength" ); var metaDescriptionKeyword = require( "./researches/metaDescriptionKeyword.js" ); var keywordCountInUrl = require( "./researches/keywordCountInUrl" ); import findKeywordInFirstParagraph from "./researches/findKeywordInFirstParagraph.js"; var pageTitleWidth = require( "./researches/pageTitleWidth.js" ); var wordComplexity = require( "./researches/getWordComplexity.js" ); var getParagraphLength = require( "./researches/getParagraphLength.js" ); var countSentencesFromText = require( "./researches/countSentencesFromText.js" ); var countSentencesFromDescription = require( "./researches/countSentencesFromDescription.js" ); var getSubheadingTextLengths = require( "./researches/getSubheadingTextLengths.js" ); var findTransitionWords = require( "./researches/findTransitionWords.js" ); var passiveVoice = require( "./researches/getPassiveVoice.js" ); var getSentenceBeginnings = require( "./researches/getSentenceBeginnings.js" ); var relevantWords = require( "./researches/relevantWords" ); var readingTime = require( "./researches/readingTime" ); var getTopicDensity = require( "./researches/getTopicDensity" ); var topicCount = require( "./researches/topicCount" ); const largestKeywordDistance = require( "./researches/largestKeywordDistance" ); const morphology = require( "./researches/buildKeywordForms" ).research; ======= import wordCountInText from "./researches/wordCountInText.js"; import getLinkStatistics from "./researches/getLinkStatistics.js"; import linkCount from "./researches/countLinks.js"; import getLinks from "./researches/getLinks.js"; import urlLength from "./researches/urlIsTooLong.js"; import findKeywordInPageTitle from "./researches/findKeywordInPageTitle.js"; import matchKeywordInSubheadings from "./researches/matchKeywordInSubheadings.js"; import getKeywordDensity from "./researches/getKeywordDensity.js"; import keywordCount from "./researches/keywordCount"; import stopWordsInKeyword from "./researches/stopWordsInKeyword"; import stopWordsInUrl from "./researches/stopWordsInUrl"; import calculateFleschReading from "./researches/calculateFleschReading.js"; import metaDescriptionLength from "./researches/metaDescriptionLength.js"; import imageCount from "./researches/imageCountInText.js"; import altTagCount from "./researches/imageAltTags.js"; import keyphraseLength from "./researches/keyphraseLength"; import metaDescriptionKeyword from "./researches/metaDescriptionKeyword.js"; import keywordCountInUrl from "./researches/keywordCountInUrl"; import findKeywordInFirstParagraph from "./researches/findKeywordInFirstParagraph.js"; import pageTitleWidth from "./researches/pageTitleWidth.js"; import wordComplexity from "./researches/getWordComplexity.js"; import getParagraphLength from "./researches/getParagraphLength.js"; import countSentencesFromText from "./researches/countSentencesFromText.js"; import countSentencesFromDescription from "./researches/countSentencesFromDescription.js"; import getSubheadingTextLengths from "./researches/getSubheadingTextLengths.js"; import findTransitionWords from "./researches/findTransitionWords.js"; import passiveVoice from "./researches/getPassiveVoice.js"; import getSentenceBeginnings from "./researches/getSentenceBeginnings.js"; import relevantWords from "./researches/relevantWords"; import readingTime from "./researches/readingTime"; import getTopicDensity from "./researches/getTopicDensity"; import topicCount from "./researches/topicCount"; import largestKeywordDistance from "./researches/largestKeywordDistance"; >>>>>>> import wordCountInText from "./researches/wordCountInText.js"; import getLinkStatistics from "./researches/getLinkStatistics.js"; import linkCount from "./researches/countLinks.js"; import getLinks from "./researches/getLinks.js"; import urlLength from "./researches/urlIsTooLong.js"; import findKeywordInPageTitle from "./researches/findKeywordInPageTitle.js"; import matchKeywordInSubheadings from "./researches/matchKeywordInSubheadings.js"; import getKeywordDensity from "./researches/getKeywordDensity.js"; import keywordCount from "./researches/keywordCount"; import stopWordsInKeyword from "./researches/stopWordsInKeyword"; import stopWordsInUrl from "./researches/stopWordsInUrl"; import calculateFleschReading from "./researches/calculateFleschReading.js"; import metaDescriptionLength from "./researches/metaDescriptionLength.js"; import imageCount from "./researches/imageCountInText.js"; import altTagCount from "./researches/imageAltTags.js"; import keyphraseLength from "./researches/keyphraseLength"; import metaDescriptionKeyword from "./researches/metaDescriptionKeyword.js"; import keywordCountInUrl from "./researches/keywordCountInUrl"; import findKeywordInFirstParagraph from "./researches/findKeywordInFirstParagraph.js"; import pageTitleWidth from "./researches/pageTitleWidth.js"; import wordComplexity from "./researches/getWordComplexity.js"; import getParagraphLength from "./researches/getParagraphLength.js"; import countSentencesFromText from "./researches/countSentencesFromText.js"; import countSentencesFromDescription from "./researches/countSentencesFromDescription.js"; import getSubheadingTextLengths from "./researches/getSubheadingTextLengths.js"; import findTransitionWords from "./researches/findTransitionWords.js"; import passiveVoice from "./researches/getPassiveVoice.js"; import getSentenceBeginnings from "./researches/getSentenceBeginnings.js"; import relevantWords from "./researches/relevantWords"; import readingTime from "./researches/readingTime"; import getTopicDensity from "./researches/getTopicDensity"; import topicCount from "./researches/topicCount"; import largestKeywordDistance from "./researches/largestKeywordDistance"; import { research } from "./researches/buildKeywordForms"; const morphology = research; <<<<<<< /** * Add research data provider to the researcher by the research name. * * @param {string} research The identifier of the research. * @param {function} provider The reference to the dataProvider. * * @returns {void}. */ Researcher.prototype.addResearchDataProvider = function( research, provider ) { this._dataProviders[ research ] = provider; }; /** * Return the research data from a research data provider by research name. * * @param {string} research The identifier of the research. * * @returns {*} The data provided by the provider, false if the data do not exist */ Researcher.prototype.getProvidedData = function( research ) { if ( this._dataProviders.hasOwnProperty( research ) ) { return this._dataProviders[ research ]; } return false; }; module.exports = Researcher; ======= export default Researcher; >>>>>>> /** * Add research data provider to the researcher by the research name. * * @param {string} research The identifier of the research. * @param {function} provider The reference to the dataProvider. * * @returns {void}. */ Researcher.prototype.addResearchDataProvider = function( research, provider ) { this._dataProviders[ research ] = provider; }; /** * Return the research data from a research data provider by research name. * * @param {string} research The identifier of the research. * * @returns {*} The data provided by the provider, false if the data do not exist */ Researcher.prototype.getProvidedData = function( research ) { if ( this._dataProviders.hasOwnProperty( research ) ) { return this._dataProviders[ research ]; } return false; }; export default Researcher;
<<<<<<< }; /** * Divides the total score by ten and calls the scoreRating function. * @param {number|string} score * @returns {string} scoreRate */ YoastSEO.ScoreFormatter.prototype.overallScoreRating = function( score ) { if ( typeof score === "number" ) { score = ( score / 10 ); } return this.scoreRating( score ); ======= }; /** * Returns a translated score description based on the textual score rating * * @param {string} scoreRating Textual score rating, can be retrieved with scoreRating from the actual score. * * @return {string} */ YoastSEO.ScoreFormatter.prototype.getSEOScoreText = function( scoreRating ) { var scoreText = ""; switch ( scoreRating ) { case "na": scoreText = this.i18n.dgettext( "js-text-analysis", "No keyword" ); break; case "bad": scoreText = this.i18n.dgettext( "js-text-analysis", "Bad SEO score" ); break; case "poor": scoreText = this.i18n.dgettext( "js-text-analysis", "Poor SEO score" ); break; case "ok": scoreText = this.i18n.dgettext( "js-text-analysis", "Ok SEO score" ); break; case "good": scoreText = this.i18n.dgettext( "js-text-analysis", "Good SEO score" ); break; } return scoreText; >>>>>>> }; /** * Divides the total score by ten and calls the scoreRating function. * @param {number|string} score * @returns {string} scoreRate */ YoastSEO.ScoreFormatter.prototype.overallScoreRating = function( score ) { if ( typeof score === "number" ) { score = ( score / 10 ); } return this.scoreRating( score ); }; /** * Returns a translated score description based on the textual score rating * * @param {string} scoreRating Textual score rating, can be retrieved with scoreRating from the actual score. * * @return {string} */ YoastSEO.ScoreFormatter.prototype.getSEOScoreText = function( scoreRating ) { var scoreText = ""; switch ( scoreRating ) { case "na": scoreText = this.i18n.dgettext( "js-text-analysis", "No keyword" ); break; case "bad": scoreText = this.i18n.dgettext( "js-text-analysis", "Bad SEO score" ); break; case "poor": scoreText = this.i18n.dgettext( "js-text-analysis", "Poor SEO score" ); break; case "ok": scoreText = this.i18n.dgettext( "js-text-analysis", "Ok SEO score" ); break; case "good": scoreText = this.i18n.dgettext( "js-text-analysis", "Good SEO score" ); break; } return scoreText;
<<<<<<< metaDesc = this.refObj.pluggable._applyModifications( "data_meta_desc", metaDesc ); // If no meta has been set, generate one. if ( isEmpty( metaDesc ) ) { metaDesc = this.getMetaText(); } if ( !isEmpty( this.opts.metaDescriptionDate ) ) { ======= if ( !isEmpty( this.opts.metaDescriptionDate ) && !isEmpty( metaDesc ) ) { >>>>>>> metaDesc = this.refObj.pluggable._applyModifications( "data_meta_desc", metaDesc ); // If no meta has been set, generate one. if ( isEmpty( metaDesc ) ) { metaDesc = this.getMetaText(); } if ( !isEmpty( this.opts.metaDescriptionDate ) && !isEmpty( metaDesc ) ) { <<<<<<< title: getAnalyzerTitle.call( this ), url: getAnalyzerUrl.call( this ), metaDesc: getAnalyzerMetaDesc.call( this ) ======= title: this.data.title, url: this.data.urlPath, metaDesc: getMetaDesc.call( this ) >>>>>>> title: getAnalyzerTitle.call( this ), url: this.data.urlPath, metaDesc: getAnalyzerMetaDesc.call( this )
<<<<<<< describe( "A test that uses the Spanish Flesch Reading", function() { it( "returns a score", function() { var mockPaper = new Paper( "Existen seis subespecies de tigre, de las cuales la de Bengala es la más numerosa.", { locale: "es_ES" } ); expect( fleschFunction( mockPaper ) ).toBe( 83.5 ); } ); } ); ======= describe( "A test that uses the French Flesch Reading", function() { it( "returns a score", function() { var mockPaper = new Paper( "Comme la plupart des grands herbivores, le cheval dort peu, de trois à cinq heures par jour, en raison de sa vulnérabilité aux prédateurs", { locale: "fr_FR" } ); expect( fleschFunction( mockPaper ) ).toBe( 72.2 ); } ); } ); >>>>>>> describe( "A test that uses the Spanish Flesch Reading", function() { it( "returns a score", function() { var mockPaper = new Paper( "Existen seis subespecies de tigre, de las cuales la de Bengala es la más numerosa.", { locale: "es_ES" } ); expect( fleschFunction( mockPaper ) ).toBe( 83.5 ); } ); } ); describe( "A test that uses the French Flesch Reading", function() { it( "returns a score", function() { var mockPaper = new Paper( "Comme la plupart des grands herbivores, le cheval dort peu, de trois à cinq heures par jour, en raison de sa vulnérabilité aux prédateurs", { locale: "fr_FR" } ); expect( fleschFunction( mockPaper ) ).toBe( 72.2 ); } ); } );
<<<<<<< expect( assessment.getText() ).toBe( "The length of all subheadings is less than or equal to the recommended maximum of 30 characters, which is great." ); ======= expect( assessment.getText() ).toBe( "The length of all subheadings is less than the recommended maximum of 30 characters, which is great." ); expect( assessment.hasMarks() ).toBe( false ); >>>>>>> expect( assessment.getText() ).toBe( "The length of all subheadings is less than or equal to the recommended maximum of 30 characters, which is great." ); expect( assessment.hasMarks() ).toBe( false );
<<<<<<< filterSpecialCharacters: filterSpecialCharacters, ======= filterFunctionWordsAnywhere: filterFunctionWordsAnywhere, filterOnSyllableCount: filterOnSyllableCount, >>>>>>> filterFunctionWordsAnywhere: filterFunctionWordsAnywhere,
<<<<<<< /** * Returns the width of the title in pixels. * * @returns {Number} The width of the title in pixels. */ SnippetPreview.prototype.getTitleWidth = function() { return this.data.titleWidth; }; ======= /** * Returns whether or not an app object is present. * * @returns {boolean} Whether or not there is an App object present. */ SnippetPreview.prototype.hasApp = function() { return !isUndefined( this.refObj ); }; /** * Returns whether or not a pluggable object is present. * * @returns {boolean} Whether or not there is a Pluggable object present. */ SnippetPreview.prototype.hasPluggable = function() { return !isUndefined( this.refObj ) && !isUndefined( this.refObj.pluggable ); }; >>>>>>> /** * Returns the width of the title in pixels. * * @returns {Number} The width of the title in pixels. */ SnippetPreview.prototype.getTitleWidth = function() { return this.data.titleWidth; }; /** * Returns whether or not an app object is present. * * @returns {boolean} Whether or not there is an App object present. */ SnippetPreview.prototype.hasApp = function() { return !isUndefined( this.refObj ); }; /** * Returns whether or not a pluggable object is present. * * @returns {boolean} Whether or not there is a Pluggable object present. */ SnippetPreview.prototype.hasPluggable = function() { return !isUndefined( this.refObj ) && !isUndefined( this.refObj.pluggable ); };
<<<<<<< import BackgroundImagePanel, { BackgroundClasses, BackgroundDropZone, BackgroundVideo } from '../../../components/background'; ======= import BackgroundPanel, { BackgroundClasses, BackgroundDropZone } from '../../../components/background'; >>>>>>> import BackgroundPanel, { BackgroundClasses, BackgroundDropZone, BackgroundVideo } from '../../../components/background';
<<<<<<< import BackgroundImagePanel, { BackgroundClasses, BackgroundDropZone, BackgroundVideo } from '../../../components/background'; ======= import BackgroundPanel, { BackgroundClasses, BackgroundDropZone } from '../../../components/background'; >>>>>>> import BackgroundPanel, { BackgroundClasses, BackgroundDropZone, BackgroundVideo } from '../../../components/background';
<<<<<<< { backgroundImg ? <Dropdown className={ classnames( 'components-dropdown-menu', 'components-coblocks-icon-dropdown' ) } contentClassName="components-dropdown-menu__popover" renderToggle={ ( { isOpen, onToggle } ) => { const openOnArrowDown = ( event ) => { if ( ! isOpen && event.keyCode === DOWN ) { event.preventDefault(); event.stopPropagation(); onToggle(); } }; return ( <IconButton className="components-dropdown-menu__toggle" icon={ icons.backgroundImage } onClick={ onToggle } onKeyDown={ openOnArrowDown } aria-haspopup="true" aria-expanded={ isOpen } label={ 'Edit background' } tooltip={ 'Edit background' } > <span className="components-dropdown-menu__indicator" /> </IconButton> ); } } renderContent={ ( { onClose } ) => { return ( <NavigableMenu className="components-dropdown-menu__menu" role="menu" aria-label={ __( 'Edit background' ) } > <MediaUpload onSelect={ ( media ) => { setAttributes( { backgroundImg: media.url } ); // Set padding when background image is added. if ( BLOCKS_WITH_AUTOPADDING.includes( props.name ) ){ if ( ! attributes.paddingSize || attributes.paddingSize == 'no' ) { setAttributes( { paddingSize: 'medium' } ); } } } } allowedTypes={ ALLOWED_BG_MEDIA_TYPES } value={ backgroundImg } render={ ( { open } ) => ( <IconButton className="components-dropdown-menu__menu-item" icon={ icons.edit } role="menuitem" onClick={ open } > { __( 'Edit Background' ) } </IconButton> ======= <MediaUpload onSelect={ ( media ) => { setAttributes( { backgroundImg: media.url, backgroundType: media.type } ); // Set padding when background image is added. if ( BLOCKS_WITH_AUTOPADDING.includes( props.name ) ){ if ( ! attributes.paddingSize || attributes.paddingSize == 'no' ) { setAttributes( { paddingSize: 'medium' } ); } } } } allowedTypes={ ALLOWED_BG_MEDIA_TYPES } value={ backgroundImg } render={ ( { open } ) => ( <IconButton className="components-toolbar__control" label={ backgroundImg ? ( typeof options !== 'undefined' && typeof options.editLabel !== 'undefined' ) ? options.editLabel : __( 'Edit background image' ) : ( typeof options !== 'undefined' && typeof options.addLabel !== 'undefined' ) ? options.addLabel : __( 'Add background image' ) } icon={ backgroundImg ? icons.edit : icons.backgroundImage } onClick={ open } /> ) } /> { backgroundImg && <IconButton className="components-toolbar__control" label={ ( typeof options !== 'undefined' && typeof options.deleteLabel !== 'undefined' ) ? options.deleteLabel : __( 'Remove background image' ) } icon={ icons.trash } onClick={ () => { setAttributes( { backgroundImg: '', backgroundOverlay: 0, backgroundRepeat: 'no-repeat', backgroundPosition: '', backgroundSize: 'cover', hasParallax: false, } ); >>>>>>> { backgroundImg ? <Dropdown className={ classnames( 'components-dropdown-menu', 'components-coblocks-icon-dropdown' ) } contentClassName="components-dropdown-menu__popover" renderToggle={ ( { isOpen, onToggle } ) => { const openOnArrowDown = ( event ) => { if ( ! isOpen && event.keyCode === DOWN ) { event.preventDefault(); event.stopPropagation(); onToggle(); } }; return ( <IconButton className="components-dropdown-menu__toggle" icon={ icons.backgroundImage } onClick={ onToggle } onKeyDown={ openOnArrowDown } aria-haspopup="true" aria-expanded={ isOpen } label={ 'Edit background' } tooltip={ 'Edit background' } > <span className="components-dropdown-menu__indicator" /> </IconButton> ); } } renderContent={ ( { onClose } ) => { return ( <NavigableMenu className="components-dropdown-menu__menu" role="menu" aria-label={ __( 'Edit background' ) } > <MediaUpload onSelect={ ( media ) => { setAttributes( { backgroundImg: media.url, backgroundType: media.type } ); // Set padding when background image is added. if ( BLOCKS_WITH_AUTOPADDING.includes( props.name ) ){ if ( ! attributes.paddingSize || attributes.paddingSize == 'no' ) { setAttributes( { paddingSize: 'medium' } ); } } } } allowedTypes={ ALLOWED_BG_MEDIA_TYPES } value={ backgroundImg } render={ ( { open } ) => ( <IconButton className="components-dropdown-menu__menu-item" icon={ icons.edit } role="menuitem" onClick={ open } > { __( 'Edit Background' ) } </IconButton>
<<<<<<< import BackgroundImagePanel, { BackgroundClasses, BackgroundDropZone, BackgroundVideo } from '../../../../components/background'; ======= import BackgroundPanel, { BackgroundClasses, BackgroundDropZone } from '../../../../components/background'; >>>>>>> import BackgroundPanel, { BackgroundClasses, BackgroundDropZone, BackgroundVideo } from '../../../../components/background';
<<<<<<< { BackgroundVideo( attributes ) } ======= { isBlobURL( backgroundImg ) && <Spinner /> } { backgroundType == 'video' ? <div className="coblocks-video-background"> <video playsinline="" autoplay="" muted={ videoMuted } loop={ videoLoop } src={ backgroundImg } ></video> </div> : null } >>>>>>> { isBlobURL( backgroundImg ) && <Spinner /> } { BackgroundVideo( attributes ) }
<<<<<<< this.services.init(); // Starts the IPC internal broker if (!feature || (feature && (feature.servers === undefined || feature.servers === true))) { ======= if (feature === undefined) { feature = {}; } if (params.server) { feature.servers = true; feature.workers = false; } else { if (params.worker) { feature.servers = false; feature.workers = true; } } // Starts the internal broker server if (!feature.dummy && (feature.servers === undefined || feature.servers === true)) { >>>>>>> this.services.init(); if (feature === undefined) { feature = {}; } if (params.server) { feature.servers = true; feature.workers = false; } else { if (params.worker) { feature.servers = false; feature.workers = true; } } // Starts the internal broker server if (!feature.dummy && (feature.servers === undefined || feature.servers === true)) {
<<<<<<< UserRepository.prototype.generateToken = function (username, opts) { var deferred = q.defer(), options = opts || {}, encodedToken, error; if (username === null) { error = new InternalError('Unknown User : cannot generate token'); deferred.reject(error); return deferred.promise; } if (!options.algorithm) { options.algorithm = kuzzle.config.jsonWebToken.algorithm; } if (!options.expiresIn) { options.expiresIn = kuzzle.config.jsonWebToken.expiresIn; } try { encodedToken = jwt.sign({_id: username}, kuzzle.config.jsonWebToken.secret, options); deferred.resolve(encodedToken); } catch (err) { error = new InternalError('Error loading User'); error.details = err; deferred.reject(error); } return deferred.promise; }; UserRepository.prototype.loadFromToken = function (userToken) { var deferred = q.defer(), decodedToken, error; if (userToken === null) { return this.anonymous(); } try { decodedToken = jwt.verify(userToken, kuzzle.config.jsonWebToken.secret); if (decodedToken._id === 'admin') { return this.admin(); } this.load(decodedToken._id) .then(function (user) { if (user === null) { deferred.resolve(this.anonymous()); } else { deferred.resolve(user); } }.bind(this)) .catch(function (err) { deferred.reject(err); }); } catch (err) { if (err instanceof jwt.TokenExpiredError) { error = new UnauthorizedError('Token expired', 401); error.details = { subCode: error.subCodes.TokenExpired, expiredAt: err.expiredAt }; } else if (err instanceof jwt.JsonWebTokenError) { error = new UnauthorizedError('Json Web Token Error', 401); error.details = { subCode: error.subCodes.JsonWebTokenError, description: err.message }; } else { error = new InternalError('Error loading User'); error.details = err; } deferred.reject(error); } return deferred.promise; }; UserRepository.prototype.loadByUsernameAndPassword = function (username, password) { var deferred = q.defer(), passwordManager = new PasswordManager(kuzzle.config.passwordManager); this.load(username) .then(function (user) { if (user === null) { deferred.resolve(null); } else { passwordManager.checkPassword(password, user.password) .then(function(result) { if (result === false) { user = null; } deferred.resolve(user); }); } }) .catch(function (err) { deferred.reject(err); }); return deferred.promise; }; UserRepository.prototype.load = function (id) { if (id === 'anonymous' || id === -1) { return this.anonymous(); } if (id === 'admin') { return this.admin(); } return Repository.prototype.load.call(this, id); }; UserRepository.prototype.persist = function (user, opts) { var deferred = q.defer(), options = opts || {}, databaseOptions = options.database || {}, cacheOptions = options.cache || {}, response; ======= UserRepository.prototype.persist = function (user) { >>>>>>> UserRepository.prototype.load = function (id) { if (id === 'anonymous' || id === -1) { return this.anonymous(); } if (id === 'admin') { return this.admin(); } return Repository.prototype.load.call(this, id); }; UserRepository.prototype.persist = function (user, opts) { var deferred = q.defer(), options = opts || {}, databaseOptions = options.database || {}, cacheOptions = options.cache || {}, response;
<<<<<<< import { MODALS_DOMAIN_ADD, MODALS_DOMAIN_EDIT, MODALS_EVENT_ADD, MODALS_EVENT_EDIT } from '../../constants/modals' ======= import { MODALS_DOMAIN_EDIT, MODALS_DOMAIN_ADD, MODALS_PERMANENT_TOKEN_EDIT, MODALS_PERMANENT_TOKEN_ADD } from '../../constants/modals' >>>>>>> import { MODALS_DOMAIN_ADD, MODALS_DOMAIN_EDIT, MODALS_EVENT_ADD, MODALS_EVENT_EDIT, MODALS_PERMANENT_TOKEN_ADD, MODALS_PERMANENT_TOKEN_EDIT } from '../../constants/modals' <<<<<<< const showDomainAddModal = () => { ======= useEffect(() => { props.fetchPermanentTokens(props) }, []) const showDomainEditModal = (id, title) => { >>>>>>> useEffect(() => { props.fetchPermanentTokens(props) }, []) const showDomainAddModal = () => { <<<<<<< const showEventAddModal = () => { props.addModalsModal({ type: MODALS_EVENT_ADD, props: {} }) } const showEventEditModal = (event) => { props.addModalsModal({ type: MODALS_EVENT_EDIT, props: event }) } const eventsFetching = [ h(Message, { status: 'warning' }, 'Fetching events...') ] const eventsItems = [ ...props.events.value.map( (event) => [ h(LinkItem, { type: 'button', text: event.id, onClick: () => showEventEditModal(event) }, event.title), h(Line) ] ).flat(), h(LinkItem, { type: 'button', onClick: showEventAddModal }, 'New event') ] ======= const permanentTokensFetching = [ h(Message, { status: 'warning' }, 'Fetching permanent tokens...') ] const permanentTokensItems = [ ...props.permanentTokens.value.map( (permanentToken) => [ h(LinkItem, { type: 'button', text: permanentToken.id, onClick: () => showPermanentTokenEditModal(permanentToken.id, permanentToken.title) }, permanentToken.title), h(Line) ] ).flat(), h(LinkItem, { type: 'button', onClick: showPermanentTokenAddModal }, 'New permanent token') ] >>>>>>> const eventsFetching = [ h(Message, { status: 'warning' }, 'Fetching events...') ] const eventsItems = [ ...props.events.value.map( (event) => [ h(LinkItem, { type: 'button', text: event.id, onClick: () => showEventEditModal(event) }, event.title), h(Line) ] ).flat(), h(LinkItem, { type: 'button', onClick: showEventAddModal }, 'New event') ] const permanentTokensFetching = [ h(Message, { status: 'warning' }, 'Fetching permanent tokens...') ] const permanentTokensItems = [ ...props.permanentTokens.value.map( (permanentToken) => [ h(LinkItem, { type: 'button', text: permanentToken.id, onClick: () => showPermanentTokenEditModal(permanentToken.id, permanentToken.title) }, permanentToken.title), h(Line) ] ).flat(), h(LinkItem, { type: 'button', onClick: showPermanentTokenAddModal }, 'New permanent token') ] <<<<<<< headline: 'Events' }, ...(props.events.fetching === true ? eventsFetching : eventsItems) ), h(CardSetting, { ======= headline: 'Permanent Tokens' }, ...(props.permanentTokens.fetching === true ? permanentTokensFetching : permanentTokensItems) ), h(CardSetting, { >>>>>>> headline: 'Events' }, ...(props.events.fetching === true ? eventsFetching : eventsItems) ), h(CardSetting, { headline: 'Permanent Tokens' }, ...(props.permanentTokens.fetching === true ? permanentTokensFetching : permanentTokensItems) ), h(CardSetting, {
<<<<<<< export const MODALS_EVENT_ADD = 'modals_event_add' export const MODALS_EVENT_EDIT = 'modals_event_edit' ======= export const MODALS_DOMAIN_ADD = 'modals_domain_add' export const MODALS_PERMANENT_TOKEN_EDIT = 'modals_permanent_token_edit' export const MODALS_PERMANENT_TOKEN_ADD = 'modals_permanent_token_add' >>>>>>> export const MODALS_EVENT_ADD = 'modals_event_add' export const MODALS_EVENT_EDIT = 'modals_event_edit' export const MODALS_PERMANENT_TOKEN_ADD = 'modals_permanent_token_add' export const MODALS_PERMANENT_TOKEN_EDIT = 'modals_permanent_token_edit'
<<<<<<< import { decrypt, encrypt } from './../helper/secure.js'; ======= import Connector from './../connectors/connector.js'; >>>>>>> import { decrypt, encrypt } from './../helper/secure.js'; import Connector from './../connectors/connector.js'; <<<<<<< // testButton.addEventListener('click', (event) => { // self.test(); // }); self.subscriptions = new CompositeDisposable(); self.subscriptions.add(atom.commands.add(this.element, { ======= atom.commands.add(this.element, { >>>>>>> self.subscriptions = new CompositeDisposable(); self.subscriptions.add(atom.commands.add(this.element, { <<<<<<< self.nameInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].name = self.nameInput.getText().trim(); self.selectServer.selectedOptions[0].text = self.nameInput.getText().trim(); } }); self.hostInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].host = self.hostInput.getText().trim(); } }); self.portInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].port = self.portInput.getText().trim(); } }); self.userInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].user = self.userInput.getText().trim(); } }); ======= self.nameInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].name = self.nameInput.getText().trim(); self.selectServer.selectedOptions[0].text = self.nameInput.getText().trim(); } }); self.hostInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].host = self.hostInput.getText().trim(); } }); self.portInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].port = self.portInput.getText().trim(); } }); self.protocolSelect.addEventListener('change', (event) => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; let option = event.currentTarget.selectedOptions[0]; if (option.value == 'sftp') { self.configArray[index].sftp = true; } else { self.configArray[index].logon = 'credentials'; self.configArray[index].sftp = false; self.configArray[index].useAgent = false; self.configArray[index].privatekeyfile = ''; } self.fillInputFields(self.configArray[index]); } }); self.logonTypeSelect.addEventListener('change', (event) => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; let option = event.currentTarget.selectedOptions[0]; if (option.value == 'credentials') { self.configArray[index].logon = 'credentials'; self.configArray[index].useAgent = false; self.configArray[index].privatekeyfile = ''; } else if (option.value == 'keyfile') { self.configArray[index].logon = 'keyfile'; self.configArray[index].useAgent = false; } else if (option.value == 'agent') { self.configArray[index].logon = 'agent'; self.configArray[index].useAgent = true; self.configArray[index].privatekeyfile = ''; self.configArray[index].password = ''; } else { self.configArray[index].useAgent = false; } self.fillInputFields(self.configArray[index]); } }); self.userInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].user = self.userInput.getText().trim(); } }); >>>>>>> self.nameInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].name = self.nameInput.getText().trim(); self.selectServer.selectedOptions[0].text = self.nameInput.getText().trim(); } }); self.hostInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].host = self.hostInput.getText().trim(); } }); self.portInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].port = self.portInput.getText().trim(); } }); self.protocolSelect.addEventListener('change', (event) => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; let option = event.currentTarget.selectedOptions[0]; if (option.value == 'sftp') { self.configArray[index].sftp = true; } else { self.configArray[index].logon = 'credentials'; self.configArray[index].sftp = false; self.configArray[index].useAgent = false; self.configArray[index].privatekeyfile = ''; } self.fillInputFields(self.configArray[index]); } }); self.logonTypeSelect.addEventListener('change', (event) => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; let option = event.currentTarget.selectedOptions[0]; if (option.value == 'credentials') { self.configArray[index].logon = 'credentials'; self.configArray[index].useAgent = false; self.configArray[index].privatekeyfile = ''; } else if (option.value == 'keyfile') { self.configArray[index].logon = 'keyfile'; self.configArray[index].useAgent = false; } else if (option.value == 'agent') { self.configArray[index].logon = 'agent'; self.configArray[index].useAgent = true; self.configArray[index].privatekeyfile = ''; self.configArray[index].password = ''; } else { self.configArray[index].useAgent = false; } self.fillInputFields(self.configArray[index]); } }); self.userInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].user = self.userInput.getText().trim(); } }); <<<<<<< self.privatekeyfileInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].privatekeyfile = self.privatekeyfileInput.getText().trim(); } }); self.remoteInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].remote = self.remoteInput.getText().trim(); } }); ======= >>>>>>>
<<<<<<< self.privatekeyfileInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].privatekeyfile = self.privatekeyfileInput.getText().trim(); } }); self.remoteInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].remote = self.remoteInput.getText().trim(); } }); ======= self.agentInput.addEventListener('change', (event) => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].useAgent = self.agentInput.checked; if (self.agentInput.checked) { self.privatekeyfileControl.setAttribute("style", "display:none;"); self.passwordControl.setAttribute("style", "display:none;"); self.protocolControl.setAttribute("style", "display:none;"); } else { self.privatekeyfileControl.removeAttribute("style"); self.passwordControl.removeAttribute("style"); self.protocolControl.removeAttribute("style"); } } }); self.privatekeyfileInput.getModel() .onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].privatekeyfile = self.privatekeyfileInput.getText() .trim(); } }); self.remoteInput.getModel() .onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].remote = self.remoteInput.getText() .trim(); } }); >>>>>>> self.agentInput.addEventListener('change', (event) => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].useAgent = self.agentInput.checked; if (self.agentInput.checked) { self.privatekeyfileControl.setAttribute("style", "display:none;"); self.passwordControl.setAttribute("style", "display:none;"); self.protocolControl.setAttribute("style", "display:none;"); } else { self.privatekeyfileControl.removeAttribute("style"); self.passwordControl.removeAttribute("style"); self.protocolControl.removeAttribute("style"); } } }); self.privatekeyfileInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].privatekeyfile = self.privatekeyfileInput.getText().trim(); } }); self.remoteInput.getModel().onDidChange(() => { if (self.configArray.length !== 0 && !self.disableEventhandler) { let index = self.selectServer.selectedOptions[0].value; self.configArray[index].remote = self.remoteInput.getText().trim(); } });
<<<<<<< ======= import { decrypt, encrypt, checkPasswordExists, checkPassword, setPassword, changePassword } from './helper/secure.js'; import { basename, trailingslashit, normalize } from './helper/format.js'; >>>>>>> import { decrypt, encrypt, checkPasswordExists, checkPassword, setPassword, changePassword } from './helper/secure.js'; import { basename, trailingslashit, normalize } from './helper/format.js'; <<<<<<< ======= const Path = require('path'); const getIconServices = require('./helper/icon.js'); const atom = global.atom; >>>>>>> const Path = require('path'); const getIconServices = require('./helper/icon.js'); const atom = global.atom; <<<<<<< // Add to Upload Queue let queueItem = Queue.addFile({ direction: "upload", remotePath: editor.saveObject.getPath(true) + editor.saveObject.name, localPath: editor.saveObject.getLocalPath(true) + editor.saveObject.name, size: editor.saveObject.size }); // Upload file editor.saveObject.getRoot().connector.uploadFile(queueItem).then(() => { if (atom.config.get('ftp-remote-edit.notifications.showNotificationOnUpload')) { editor.saveObject.getRoot().connector.showMessage('File successfully uploaded.', 'success'); } if (foundInTreeView) { // Remove sync icon foundInTreeView.removeSyncFileIcon(); } }).catch((err) => { queueItem.changeStatus('Error'); editor.saveObject.getRoot().connector.showMessage(err.message, 'error'); if (foundInTreeView) { // Remove sync icon foundInTreeView.removeSyncFileIcon(); } }); ======= }).catch(() => { if (self.debug) { console.log('Not a remote file.'); } >>>>>>> // Add to Upload Queue let queueItem = Queue.addFile({ direction: "upload", remotePath: editor.saveObject.getPath(true) + editor.saveObject.name, localPath: editor.saveObject.getLocalPath(true) + editor.saveObject.name, size: editor.saveObject.size }); // Upload file editor.saveObject.getRoot().connector.uploadFile(queueItem).then(() => { if (atom.config.get('ftp-remote-edit.notifications.showNotificationOnUpload')) { editor.saveObject.getRoot().connector.showMessage('File successfully uploaded.', 'success'); } if (foundInTreeView) { // Remove sync icon foundInTreeView.removeSyncFileIcon(); } }).catch((err) => { queueItem.changeStatus('Error'); editor.saveObject.getRoot().connector.showMessage(err.message, 'error'); if (foundInTreeView) { // Remove sync icon foundInTreeView.removeSyncFileIcon(); } });
<<<<<<< import { getConfig, resetIgnoredPatterns } from './../helper/helper.js'; ======= >>>>>>> import { resetIgnoredPatterns } from './../helper/helper.js';
<<<<<<< var title = 'Test 1\\, 2\\, 3 %2 salmon'; var key = "[[topic:composer.replying_to, " + title + "]]"; ======= var title = 'Test 1\\, 2\\, 3 % salmon'; var key = '[[topic:composer.replying_to, ' + title + ']]'; >>>>>>> var title = 'Test 1\\, 2\\, 3 %2 salmon'; var key = '[[topic:composer.replying_to, ' + title + ']]';
<<<<<<< switch (target) { case 'js': setImmediate(next); break; case 'clientCSS': winston.info('[build] Building client-side CSS'); startTime = Date.now(); meta.css.minify('client', step.bind(this, startTime, target, next)); break; case 'acpCSS': winston.info('[build] Building admin control panel CSS'); startTime = Date.now(); meta.css.minify('admin', step.bind(this, startTime, target, next)); break; case 'tpl': winston.info('[build] Building templates'); startTime = Date.now(); meta.templates.compile(step.bind(this, startTime, target, next)); break; case 'lang': winston.info('[build] Building language files'); startTime = Date.now(); meta.languages.build(step.bind(this, startTime, target, next)); break; default: winston.warn('[build] Unknown build target: \'' + target + '\''); setImmediate(next); break; ======= switch(target) { case 'js': setImmediate(next); break; case 'clientCSS': winston.info('[build] Building client-side CSS'); startTime = Date.now(); meta.css.minify('client', step.bind(this, startTime, target, next)); break; case 'acpCSS': winston.info('[build] Building admin control panel CSS'); startTime = Date.now(); meta.css.minify('admin', step.bind(this, startTime, target, next)); break; case 'tpl': winston.info('[build] Building templates'); startTime = Date.now(); meta.templates.compile(step.bind(this, startTime, target, next)); break; case 'lang': winston.info('[build] Building language files'); startTime = Date.now(); meta.languages.build(step.bind(this, startTime, target, next)); break; case 'sound': winston.info('[build] Linking sound files'); startTime = Date.now(); meta.sounds.build(step.bind(this, startTime, target, next)); break; default: winston.warn('[build] Unknown build target: \'' + target + '\''); setImmediate(next); break; >>>>>>> switch (target) { case 'js': setImmediate(next); break; case 'clientCSS': winston.info('[build] Building client-side CSS'); startTime = Date.now(); meta.css.minify('client', step.bind(this, startTime, target, next)); break; case 'acpCSS': winston.info('[build] Building admin control panel CSS'); startTime = Date.now(); meta.css.minify('admin', step.bind(this, startTime, target, next)); break; case 'tpl': winston.info('[build] Building templates'); startTime = Date.now(); meta.templates.compile(step.bind(this, startTime, target, next)); break; case 'lang': winston.info('[build] Building language files'); startTime = Date.now(); meta.languages.build(step.bind(this, startTime, target, next)); break; case 'sound': winston.info('[build] Linking sound files'); startTime = Date.now(); meta.sounds.build(step.bind(this, startTime, target, next)); break; default: winston.warn('[build] Unknown build target: \'' + target + '\''); setImmediate(next); break;
<<<<<<< }, function(next) { next(null, { post: results.postData, isFavourited: isFavouriting }); ======= >>>>>>>
<<<<<<< ======= function destroy(nid) { var multi = RDB.multi(); >>>>>>>
<<<<<<< }; ======= } function initializeDragAndDrop(post_uuid) { if(jQuery.event.props.indexOf('dataTransfer') === -1) { jQuery.event.props.push('dataTransfer'); } var draggingDocument = false; var postContainer = $('#cmp-uuid-' + post_uuid), fileForm = postContainer.find('#fileForm'); drop = postContainer.find('.imagedrop'), tabContent = postContainer.find('.tab-content'), textarea = postContainer.find('textarea'); $(document).off('dragstart').on('dragstart', function(e) { draggingDocument = true; }).off('dragend').on('dragend', function(e) { draggingDocument = false; }); textarea.on('dragenter', function(e) { if(draggingDocument) { return; } drop.css('top', tabContent.position().top + 'px'); drop.css('height', textarea.height()); drop.css('line-height', textarea.height() + 'px'); drop.show(); drop.on('dragleave', function(ev) { drop.hide(); drop.off('dragleave'); }); }); function cancel(e) { e.preventDefault(); return false; } drop.on('dragover', cancel); drop.on('dragenter', cancel); drop.on('drop', function(e) { e.preventDefault(); var dt = e.dataTransfer, files = dt.files; if(files.length) { var fd = new FormData(); for (var i = 0, file; file = dt.files[i]; i++) { fd.append('files[]', file, file.name); } fileForm[0].reset(); uploadSubmit(files, post_uuid, '/api/post/upload', fd); } drop.hide(); return false; }); $(window).off('paste').on('paste', function(event) { var items = (event.clipboardData || event.originalEvent.clipboardData).items; if(items && items.length) { var blob = items[0].getAsFile(); if(blob) { blob.name = 'upload-'+ utils.generateUUID(); var fd = new FormData(); fd.append('files[]', blob, blob.name); fileForm[0].reset(); uploadSubmit([blob], post_uuid, '/api/post/upload', fd); } } }); } function uploadSubmit(files, post_uuid, route, formData, callback) { var postContainer = $('#cmp-uuid-' + post_uuid), textarea = postContainer.find('textarea'), text = textarea.val(), uploadForm = postContainer.find('#fileForm'); uploadForm.attr('action', route); for(var i=0; i<files.length; ++i) { var isImage = files[i].type.match('image.*'); text += (isImage ? '!' : '') + '[' + files[i].name + '](uploading...) '; if(files[i].size > parseInt(config.maximumFileSize, 10) * 1024) { uploadForm[0].reset(); return composerAlert('File too big', 'Maximum allowed file size is ' + config.maximumFileSize + 'kbs'); } } textarea.val(text); uploadForm.off('submit').submit(function() { $(this).find('#postUploadCsrf').val($('#csrf_token').val()); if(formData) { formData.append('_csrf', $('#csrf_token').val()); } composer.posts[post_uuid].uploadsInProgress.push(1); $(this).ajaxSubmit({ resetForm: true, clearForm: true, formData: formData, error: function(xhr) { app.alertError('Error uploading file!\nStatus : ' + xhr.status + '\nMessage : ' + xhr.responseText); }, uploadProgress: function(event, position, total, percent) { var current = textarea.val(); for(var i=0; i<files.length; ++i) { var re = new RegExp(files[i].name + "]\\([^)]+\\)", 'g'); textarea.val(current.replace(re, files[i].name+'](uploading ' + percent + '%)')); } }, success: function(uploads) { if(uploads && uploads.length) { for(var i=0; i<uploads.length; ++i) { var current = textarea.val(); var re = new RegExp(uploads[i].name + "]\\([^)]+\\)", 'g'); textarea.val(current.replace(re, uploads[i].name + '](' + uploads[i].url + ')')); } } textarea.focus(); }, complete: function(xhr, status) { uploadForm[0].reset(); composer.posts[post_uuid].uploadsInProgress.pop(); } }); return false; }); uploadForm.submit(); } >>>>>>> }; function initializeDragAndDrop(post_uuid) { if(jQuery.event.props.indexOf('dataTransfer') === -1) { jQuery.event.props.push('dataTransfer'); } var draggingDocument = false; var postContainer = $('#cmp-uuid-' + post_uuid), fileForm = postContainer.find('#fileForm'); drop = postContainer.find('.imagedrop'), tabContent = postContainer.find('.tab-content'), textarea = postContainer.find('textarea'); $(document).off('dragstart').on('dragstart', function(e) { draggingDocument = true; }).off('dragend').on('dragend', function(e) { draggingDocument = false; }); textarea.on('dragenter', function(e) { if(draggingDocument) { return; } drop.css('top', tabContent.position().top + 'px'); drop.css('height', textarea.height()); drop.css('line-height', textarea.height() + 'px'); drop.show(); drop.on('dragleave', function(ev) { drop.hide(); drop.off('dragleave'); }); }); function cancel(e) { e.preventDefault(); return false; } drop.on('dragover', cancel); drop.on('dragenter', cancel); drop.on('drop', function(e) { e.preventDefault(); var dt = e.dataTransfer, files = dt.files; if(files.length) { var fd = new FormData(); for (var i = 0, file; file = dt.files[i]; i++) { fd.append('files[]', file, file.name); } fileForm[0].reset(); uploadSubmit(files, post_uuid, '/api/post/upload', fd); } drop.hide(); return false; }); $(window).off('paste').on('paste', function(event) { var items = (event.clipboardData || event.originalEvent.clipboardData).items; if(items && items.length) { var blob = items[0].getAsFile(); if(blob) { blob.name = 'upload-'+ utils.generateUUID(); var fd = new FormData(); fd.append('files[]', blob, blob.name); fileForm[0].reset(); uploadSubmit([blob], post_uuid, '/api/post/upload', fd); } } }); } function uploadSubmit(files, post_uuid, route, formData, callback) { var postContainer = $('#cmp-uuid-' + post_uuid), textarea = postContainer.find('textarea'), text = textarea.val(), uploadForm = postContainer.find('#fileForm'); uploadForm.attr('action', route); for(var i=0; i<files.length; ++i) { var isImage = files[i].type.match('image.*'); text += (isImage ? '!' : '') + '[' + files[i].name + '](uploading...) '; if(files[i].size > parseInt(config.maximumFileSize, 10) * 1024) { uploadForm[0].reset(); return composerAlert('File too big', 'Maximum allowed file size is ' + config.maximumFileSize + 'kbs'); } } textarea.val(text); uploadForm.off('submit').submit(function() { $(this).find('#postUploadCsrf').val($('#csrf_token').val()); if(formData) { formData.append('_csrf', $('#csrf_token').val()); } composer.posts[post_uuid].uploadsInProgress.push(1); $(this).ajaxSubmit({ resetForm: true, clearForm: true, formData: formData, error: function(xhr) { app.alertError('Error uploading file!\nStatus : ' + xhr.status + '\nMessage : ' + xhr.responseText); }, uploadProgress: function(event, position, total, percent) { var current = textarea.val(); for(var i=0; i<files.length; ++i) { var re = new RegExp(files[i].name + "]\\([^)]+\\)", 'g'); textarea.val(current.replace(re, files[i].name+'](uploading ' + percent + '%)')); } }, success: function(uploads) { if(uploads && uploads.length) { for(var i=0; i<uploads.length; ++i) { var current = textarea.val(); var re = new RegExp(uploads[i].name + "]\\([^)]+\\)", 'g'); textarea.val(current.replace(re, uploads[i].name + '](' + uploads[i].url + ')')); } } textarea.focus(); }, complete: function(xhr, status) { uploadForm[0].reset(); composer.posts[post_uuid].uploadsInProgress.pop(); } }); return false; }); uploadForm.submit(); }
<<<<<<< api.get('/_getStats', function (request, response) { var params = { controller: 'admin', action: 'getStats' }; executeFromRest.call(kuzzle, params, request, response); }); api.get('/_getAllStats', function (request, response) { var params = { controller: 'admin', action: 'getAllStats' }; executeFromRest.call(kuzzle, params, request, response); }); ======= api.get('/_listCollections', function (request, response) { var params = { controller: 'read', action: 'listCollections' }; executeFromRest.call(kuzzle, params, request, response); }); >>>>>>> api.get('/_getStats', function (request, response) { var params = { controller: 'admin', action: 'getStats' }; executeFromRest.call(kuzzle, params, request, response); }); api.get('/_getAllStats', function (request, response) { var params = { controller: 'admin', action: 'getAllStats' }; executeFromRest.call(kuzzle, params, request, response); }); api.get('/_listCollections', function (request, response) { var params = { controller: 'read', action: 'listCollections' }; executeFromRest.call(kuzzle, params, request, response); });
<<<<<<< data.motd_class = (config.show_motd === '1' || config.show_motd === undefined) ? '' : 'none'; data.motd = marked(config.motd || "# NodeBB <span>v " + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.\n\n<div class='btn-group'><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"icon-comment\"></i><span><span>&nbsp;Get NodeBB</span></span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"icon-github-alt\"></i><span>&nbsp;Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/dcplabs\" class=\"btn btn-default btn-lg\"><i class=\"icon-twitter\"></i><span>&nbsp;@dcplabs</span></a></div>"); ======= data.motd_class = (meta.config.show_motd === '1' || meta.config.show_motd === undefined) ? '' : 'none'; data.motd = marked(meta.config.motd || "# NodeBB <span class='hidden-phone'>v " + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.\n\n<a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-large\"><i class=\"icon-comment\"></i><span class='hidden-phone'>&nbsp;Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-large\"><i class=\"icon-github-alt\"></i><span class='hidden-phone'>&nbsp;Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/dcplabs\" class=\"btn btn-large\"><i class=\"icon-twitter\"></i><span class='hidden-phone'>&nbsp;@dcplabs</span></a>"); >>>>>>> data.motd_class = (meta.config.show_motd === '1' || meta.config.show_motd === undefined) ? '' : 'none'; data.motd = marked(meta.config.motd || "# NodeBB <span>v " + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.\n\n<div class='btn-group'><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"icon-comment\"></i><span><span>&nbsp;Get NodeBB</span></span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"icon-github-alt\"></i><span>&nbsp;Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/dcplabs\" class=\"btn btn-default btn-lg\"><i class=\"icon-twitter\"></i><span>&nbsp;@dcplabs</span></a></div>");
<<<<<<< utils.walk(path.join(__dirname, '../language', (Meta.config.defaultLang || 'en_GB')), function (err, data) { if(err) { console.log(err.message); return; } ======= if (!fs.existsSync(path.join(__dirname, '../language', language))) { winston.warn('[translator] Language \'' + Meta.config.defaultLang + '\' not found. Defaulting to \'en_GB\''); language = 'en_GB'; } utils.walk(path.join(__dirname, '../language', language), function (err, data) { var loaded = data.length; >>>>>>> if (!fs.existsSync(path.join(__dirname, '../language', language))) { winston.warn('[translator] Language \'' + Meta.config.defaultLang + '\' not found. Defaulting to \'en_GB\''); language = 'en_GB'; } utils.walk(path.join(__dirname, '../language', language), function (err, data) {
<<<<<<< notifications.init(); process.on('SIGTERM', shutdown); process.on('SIGINT', shutdown); process.on('SIGHUP', restart); process.on('uncaughtException', function(err) { winston.error('[app] Encountered Uncaught Exception: ' + err.message); console.log(err.stack); restart(); }); ======= // Temporarily removed until ncb000gt/node-cron/issues/81 and ncb000gt/node-cron/issues/83 are fixed // notifications.init(); >>>>>>> // Temporarily removed until ncb000gt/node-cron/issues/81 and ncb000gt/node-cron/issues/83 are fixed // notifications.init(); process.on('SIGTERM', shutdown); process.on('SIGINT', shutdown); process.on('SIGHUP', restart); process.on('uncaughtException', function(err) { winston.error('[app] Encountered Uncaught Exception: ' + err.message); console.log(err.stack); restart(); });
<<<<<<< Meta.js.loadRJS(function() { Meta.js.prepare(function() { minifier.send({ action: minify ? 'js.minify' : 'js.concatenate', scripts: Meta.js.scripts }); ======= this.prepare(function() { minifier.send({ action: 'js', minify: minify, scripts: Meta.js.scripts >>>>>>> Meta.js.loadRJS(function() { Meta.js.prepare(function() { minifier.send({ action: 'js', minify: minify, scripts: Meta.js.scripts });
<<<<<<< module.exports = function (Meta) { ======= var soundsPath = path.join(__dirname, '../../build/public/sounds'); var uploadsPath = path.join(__dirname, '../../public/uploads/sounds'); module.exports = function (Meta) { >>>>>>> var soundsPath = path.join(__dirname, '../../build/public/sounds'); var uploadsPath = path.join(__dirname, '../../public/uploads/sounds'); module.exports = function (Meta) { <<<<<<< Meta.sounds.init = function (callback) { if (nconf.get('isPrimary') === 'true') { setupSounds(callback); } else if (typeof callback === 'function') { callback(); } }; ======= Meta.sounds.addUploads = function addUploads(callback) { fs.readdir(uploadsPath, function (err, files) { if (err) { if (err.code !== 'ENOENT') { return callback(err); } files = []; } >>>>>>> Meta.sounds.addUploads = function addUploads(callback) { fs.readdir(uploadsPath, function (err, files) { if (err) { if (err.code !== 'ENOENT') { return callback(err); } files = []; } <<<<<<< }, ], function (err, files) { if (err) { winston.error('Could not get local sound files:' + err.message); console.log(err.stack); return callback(null, []); } ======= } >>>>>>> } <<<<<<< function setupSounds(callback) { var soundsPath = path.join(__dirname, '../../build/public/sounds'); async.waterfall([ function (next) { fs.readdir(path.join(nconf.get('upload_path'), 'sounds'), function (err, files) { if (err) { if (err.code === 'ENOENT') { return next(null, []); } return next(err); } next(null, files); }); }, function (uploaded, next) { uploaded = uploaded.filter(function (filename) { return !filename.startsWith('.'); }).map(function (filename) { return path.join(nconf.get('upload_path'), 'sounds', filename); }); plugins.fireHook('filter:sounds.get', uploaded, function (err, filePaths) { if (err) { winston.error('Could not initialise sound files:' + err.message); return; } // Clear the sounds directory async.series([ function (next) { rimraf(soundsPath, next); }, function (next) { mkdirp(soundsPath, next); }, ], function (err) { if (err) { winston.error('Could not initialise sound files:' + err.message); return; } // Link paths async.each(filePaths, function (filePath, next) { file.link(filePath, path.join(soundsPath, path.basename(filePath)), next); }, function (err) { if (!err) { winston.verbose('[sounds] Sounds OK'); } else { winston.error('[sounds] Could not initialise sounds: ' + err.message); } if (typeof next === 'function') { next(); } }); }); }); }, ], callback); } ======= >>>>>>>
<<<<<<< function writeImageDataToFile(imageData, callback) { // Calculate md5sum of image // This is required because user data can be private var md5sum = crypto.createHash('md5'); md5sum.update(imageData); md5sum = md5sum.digest('hex'); // Save image var tempPath = path.join(nconf.get('upload_path'), md5sum + '.png'); var buffer = new Buffer(imageData.slice(imageData.indexOf('base64') + 7), 'base64'); fs.writeFile(tempPath, buffer, { encoding: 'base64', }, function (err) { callback(err, tempPath); }); } ======= >>>>>>>
<<<<<<< // Listen broker because we waiting for writeEngine response if (requestObject.waitForWriteEngine()) { ======= // Listen to the broker MQ because we're expecting a writeEngine response if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { >>>>>>> // Listen to the broker MQ because we're expecting a writeEngine response if (requestObject.waitForWriteEngine()) { <<<<<<< // Listen broker because we waiting for writeEngine response if (requestObject.waitForWriteEngine()) { ======= // Listen to the broker MQ because we're expecting a writeEngine response if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { >>>>>>> // Listen to the broker MQ because we're expecting a writeEngine response if (requestObject.waitForWriteEngine()) { <<<<<<< // Listen broker because we waiting for writeEngine response if (requestObject.waitForWriteEngine()) { ======= // Listen to the broker MQ because we're expecting a writeEngine response if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { >>>>>>> // Listen to the broker MQ because we're expecting a writeEngine response if (requestObject.waitForWriteEngine()) {
<<<<<<< async.each(Object.keys(filter[field]), (fn, callback) => { ======= async.each(Object.keys(filter[field]), function (rangeOperator, callback) { >>>>>>> async.each(Object.keys(filter[field]), function (rangeOperator, callback) { <<<<<<< curriedFunctionName, ======= encodedFunctionName, deferred = q.defer(), >>>>>>> encodedFunctionName, <<<<<<< curriedFunctionName, ======= encodedFunctionName, deferred = q.defer(), >>>>>>> encodedFunctionName, <<<<<<< curriedFunctionName, ======= encodedFunctionName, deferred = q.defer(), >>>>>>> encodedFunctionName, <<<<<<< curriedFunctionName, ======= encodedFunctionName, deferred = q.defer(), >>>>>>> encodedFunctionName, <<<<<<< curriedFunction, diff, fnSource, path; curriedFunctionName = md5(curriedFunctionName); path = index + '.' + collection + '.' + field + '.' + curriedFunctionName; ======= hashedFunctionName = md5(encodedFunctionName), path = index + '.' + collection + '.' + field + '.' + hashedFunctionName; >>>>>>> diff, hashedFunctionName = md5(encodedFunctionName), path = index + '.' + collection + '.' + field + '.' + hashedFunctionName; <<<<<<< if (methods.dsl.filtersTree[index][collection].fields[field][curriedFunctionName].rooms.indexOf(roomId) === -1) { methods.dsl.filtersTree[index][collection].fields[field][curriedFunctionName].rooms.push(roomId); if (diff) { diff.ftF.r = roomId; } else { diff = { ftR: { i: index, c: collection, f: field, r: roomId }}; } ======= if (methods.dsl.filtersTree[index][collection].fields[field][hashedFunctionName].rooms.indexOf(roomId) === -1) { methods.dsl.filtersTree[index][collection].fields[field][hashedFunctionName].rooms.push(roomId); >>>>>>> if (methods.dsl.filtersTree[index][collection].fields[field][hashedFunctionName].rooms.indexOf(roomId) === -1) { methods.dsl.filtersTree[index][collection].fields[field][hashedFunctionName].rooms.push(roomId); if (diff) { diff.ftF.r = roomId; } else { diff = { ftR: { i: index, c: collection, f: field, r: roomId }}; } <<<<<<< filter: methods.dsl.filtersTree[index][collection].fields[field][curriedFunctionName], diff: diff ======= filter: methods.dsl.filtersTree[index][collection].fields[field][hashedFunctionName] >>>>>>> filter: methods.dsl.filtersTree[index][collection].fields[field][hashedFunctionName], diff: diff <<<<<<< return q({ diff: result.diff ? [ result.diff ] : [], filter: formattedFilters }); ======= return q(formattedFilters); >>>>>>> return q({ diff: result.diff ? [ result.diff ] : [], filter: formattedFilters }); }
<<<<<<< /*templateValues.metaTags = defaultMetaTags.concat(options.metaTags || []).map(function(tag) { ======= templateValues.metaTags = defaultMetaTags.concat(options.metaTags || []).map(function(tag) { if(!tag || typeof tag.content !== 'string') { winston.warn('Invalid meta tag. ', tag); return tag; } >>>>>>> /*templateValues.metaTags = defaultMetaTags.concat(options.metaTags || []).map(function(tag) { if(!tag || typeof tag.content !== 'string') { winston.warn('Invalid meta tag. ', tag); return tag; }
<<<<<<< url = require('url'), ======= ver = '0.0.2', >>>>>>> url = require('url'), ver = '0.0.2', <<<<<<< ======= console.log('Info: Initializing NodeBB v' + ver + ', on port ' + global.config.port + ', using Redis store at ' + global.config.redis.host + ':' + global.config.redis.port + '.'); >>>>>>> console.log('Info: Initializing NodeBB v' + ver + ', on port ' + global.config.port + ', using Redis store at ' + global.config.redis.host + ':' + global.config.redis.port + '.');
<<<<<<< meta.sounds.getMapping(userData.uid, next); }, ======= meta.sounds.getUserSoundMap(userData.uid, next); } >>>>>>> meta.sounds.getUserSoundMap(userData.uid, next); }, <<<<<<< var soundSettings = { notificationSound: 'notification', incomingChatSound: 'chat-incoming', outgoingChatSound: 'chat-outgoing', ======= var types = [ 'notification', 'chat-incoming', 'chat-outgoing', ]; var aliases = { 'notification': 'notificationSound', 'chat-incoming': 'incomingChatSound', 'chat-outgoing': 'outgoingChatSound', >>>>>>> var types = [ 'notification', 'chat-incoming', 'chat-outgoing', ]; var aliases = { notification: 'notificationSound', 'chat-incoming': 'incomingChatSound', 'chat-outgoing': 'outgoingChatSound', <<<<<<< Object.keys(soundSettings).forEach(function (setting) { userData[setting] = Object.keys(results.sounds).map(function (name) { return { name: name, selected: name === results.soundsMapping[soundSettings[setting]] }; ======= types.forEach(function (type) { var soundpacks = plugins.soundpacks.map(function (pack) { var sounds = Object.keys(pack.sounds).map(function (soundName) { var value = pack.name + ' | ' + soundName; return { name: soundName, value: value, selected: value === results.soundsMapping[type], }; }); return { name: pack.name, sounds: sounds, }; >>>>>>> types.forEach(function (type) { var soundpacks = plugins.soundpacks.map(function (pack) { var sounds = Object.keys(pack.sounds).map(function (soundName) { var value = pack.name + ' | ' + soundName; return { name: soundName, value: value, selected: value === results.soundsMapping[type], }; }); return { name: pack.name, sounds: sounds, }; <<<<<<< { value: 'off', name: '[[user:digest_off]]', selected: userData.settings.dailyDigestFreq === 'off' }, { value: 'day', name: '[[user:digest_daily]]', selected: userData.settings.dailyDigestFreq === 'day' }, { value: 'week', name: '[[user:digest_weekly]]', selected: userData.settings.dailyDigestFreq === 'week' }, { value: 'month', name: '[[user:digest_monthly]]', selected: userData.settings.dailyDigestFreq === 'month' }, ======= { value: 'off', name: '[[user:digest_off]]', selected: 'off' === userData.settings.dailyDigestFreq }, { value: 'day', name: '[[user:digest_daily]]', selected: 'day' === userData.settings.dailyDigestFreq }, { value: 'week', name: '[[user:digest_weekly]]', selected: 'week' === userData.settings.dailyDigestFreq }, { value: 'month', name: '[[user:digest_monthly]]', selected: 'month' === userData.settings.dailyDigestFreq } >>>>>>> { value: 'off', name: '[[user:digest_off]]', selected: userData.settings.dailyDigestFreq === 'off' }, { value: 'day', name: '[[user:digest_daily]]', selected: userData.settings.dailyDigestFreq === 'day' }, { value: 'week', name: '[[user:digest_weekly]]', selected: userData.settings.dailyDigestFreq === 'week' }, { value: 'month', name: '[[user:digest_monthly]]', selected: userData.settings.dailyDigestFreq === 'month' },