Skip to content

Add filter for words we would rather not owoify#25

Open
zuzak wants to merge 1 commit intomainfrom
word-denylist
Open

Add filter for words we would rather not owoify#25
zuzak wants to merge 1 commit intomainfrom
word-denylist

Conversation

@zuzak
Copy link
Owner

@zuzak zuzak commented Jun 30, 2020

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.

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',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'logo':·'wogo' with logo:·"wogo"

Suggested change
'logo': 'wogo',
logo: "wogo",

'logo': 'wogo',
'logos': 'wogos',

'log': 'log',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unexpected blank line between object properties.

Suggested change
'log': 'log',
'logs': 'logs',

describe('Filtering', function () {
const subs = {
'flog': 'fwog',
'Flog': 'Fwog',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'Flog':·'Fwog' with Flog:·"Fwog"

Suggested change
'Flog': 'Fwog',
Flog: "Fwog",

const subs = {
'flog': 'fwog',
'Flog': 'Fwog',
'blogger': 'bwoggew',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'blogger':·'bwoggew' with blogger:·"bwoggew"

Suggested change
'blogger': 'bwoggew',
blogger: "bwoggew",

'Flog': 'Fwog',
'blogger': 'bwoggew',
'logo': 'wogo',
'logos': 'wogos',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'logos':·'wogos' with logos:·"wogos"

Suggested change
'logos': 'wogos',
logos: "wogos",

'logo': 'wogo',
'logos': 'wogos',

'log': 'log',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'log':·'log' with log:·"log"

Suggested change
'log': 'log',
log: "log",


describe('Filtering', function () {
const subs = {
'flog': 'fwog',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'flog':·'fwog' with flog:·"fwog"

Suggested change
'flog': 'fwog',
flog: "fwog",

'logs': 'logs',
'Log': 'Log',
'lOg': 'lOg',
'we log the data': 'we log da data',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Suggested change
'we log the data': 'we log da data',
"we log the data": "we log da data",


'log': 'log',
'logs': 'logs',
'Log': 'Log',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'Log':·'Log' with Log:·"Log"

Suggested change
'Log': 'Log',
Log: "Log",

'log': 'log',
'logs': 'logs',
'Log': 'Log',
'lOg': 'lOg',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'lOg':·'lOg' with lOg:·"lOg"

Suggested change
'lOg': 'lOg',
lOg: "lOg",

'logos': 'wogos',

'log': 'log',
'logs': 'logs',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'logs':·'logs' with logs:·"logs"

Suggested change
'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])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Insert ;

Suggested change
assert.equal(owo.filterBadWords(owo.substitute(x), x), subs[x])
assert.equal(owo.filterBadWords(owo.substitute(x), x), subs[x]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments