Conversation
Some objectionable words can inadvertently be created by the substitution of L and R to W. This commit adds a filter to search for any objectionable words, and attempt to change them back if possible.
| 'flog': 'fwog', | ||
| 'Flog': 'Fwog', | ||
| 'blogger': 'bwoggew', | ||
| 'logo': 'wogo', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'logo':·'wogo' with logo:·"wogo"
| 'logo': 'wogo', | |
| logo: "wogo", |
| 'logo': 'wogo', | ||
| 'logos': 'wogos', | ||
|
|
||
| 'log': 'log', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Unexpected blank line between object properties.
| 'log': 'log', | |
| 'logs': 'logs', |
| describe('Filtering', function () { | ||
| const subs = { | ||
| 'flog': 'fwog', | ||
| 'Flog': 'Fwog', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'Flog':·'Fwog' with Flog:·"Fwog"
| 'Flog': 'Fwog', | |
| Flog: "Fwog", |
| const subs = { | ||
| 'flog': 'fwog', | ||
| 'Flog': 'Fwog', | ||
| 'blogger': 'bwoggew', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'blogger':·'bwoggew' with blogger:·"bwoggew"
| 'blogger': 'bwoggew', | |
| blogger: "bwoggew", |
| 'Flog': 'Fwog', | ||
| 'blogger': 'bwoggew', | ||
| 'logo': 'wogo', | ||
| 'logos': 'wogos', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'logos':·'wogos' with logos:·"wogos"
| 'logos': 'wogos', | |
| logos: "wogos", |
| 'logo': 'wogo', | ||
| 'logos': 'wogos', | ||
|
|
||
| 'log': 'log', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'log':·'log' with log:·"log"
| 'log': 'log', | |
| log: "log", |
|
|
||
| describe('Filtering', function () { | ||
| const subs = { | ||
| 'flog': 'fwog', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'flog':·'fwog' with flog:·"fwog"
| 'flog': 'fwog', | |
| flog: "fwog", |
| 'logs': 'logs', | ||
| 'Log': 'Log', | ||
| 'lOg': 'lOg', | ||
| 'we log the data': 'we log da data', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'we·log·the·data':·'we·log·da·data' with "we·log·the·data":·"we·log·da·data"
| 'we log the data': 'we log da data', | |
| "we log the data": "we log da data", |
|
|
||
| 'log': 'log', | ||
| 'logs': 'logs', | ||
| 'Log': 'Log', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'Log':·'Log' with Log:·"Log"
| 'Log': 'Log', | |
| Log: "Log", |
| 'log': 'log', | ||
| 'logs': 'logs', | ||
| 'Log': 'Log', | ||
| 'lOg': 'lOg', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'lOg':·'lOg' with lOg:·"lOg"
| 'lOg': 'lOg', | |
| lOg: "lOg", |
| 'logos': 'wogos', | ||
|
|
||
| 'log': 'log', | ||
| 'logs': 'logs', |
There was a problem hiding this comment.
Codacy has a fix for the issue: Replace 'logs':·'logs' with logs:·"logs"
| 'logs': 'logs', | |
| logs: "logs", |
|
|
||
| Object.keys(subs).forEach(function (x) { | ||
| it(`should substitute ${x} with ${subs[x]}`, function() { | ||
| assert.equal(owo.filterBadWords(owo.substitute(x), x), subs[x]) |
There was a problem hiding this comment.
Codacy has a fix for the issue: Insert ;
| assert.equal(owo.filterBadWords(owo.substitute(x), x), subs[x]) | |
| assert.equal(owo.filterBadWords(owo.substitute(x), x), subs[x]); |
Some objectionable words can inadvertently be created by the
substitution of L and R to W. This commit adds a filter to search for
any objectionable words, and attempt to change them back if possible.