Whitespace is too significant for factoids
Bug #411160 reported by
Space Hobo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yardbird |
Fix Released
|
Medium
|
Zen |
Bug Description
Our factoid code nicely becomes case-insensitive, but unfortunately it treats whitespace as significant. This causes the following problem::
<@SpaceHobo> shakalaka: zoot boot
<shakalaka> No way!
<@SpaceHobo> shakalaka: zoot boot
<shakalaka> I don't know what you mean, SpaceHobo.
We need to collapse whitespace down both in learn() and trigger(). The solution to this may also inform the discussion on bug#409225.
Related branches
lp:~shaboom/yardbird/shakalaka
Merged
into
lp:yardbird
- Space Hobo: Approve
- Diff: None lines
description: | updated |
Changed in yardbird: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → another-hairdo |
Changed in yardbird: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Per our discussion on IRC, we agreed that the 'key' variable from user input should be normalized in a function that is used both in learn() and in trigger(), and we should add an re.sub(r'\s+', ' ', key) call to it.