Bug 1211208 - ibus-table-createdb should allow table keys to start with spaces
Summary: ibus-table-createdb should allow table keys to start with spaces
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus-table
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mike FABIAN
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-13 10:31 UTC by Mike FABIAN
Modified: 2016-07-06 06:28 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-06 06:28:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mike FABIAN 2015-04-13 10:31:24 UTC
James Wood> I recently came across the problem of not being able to
James Wood> bind to sequences starting with a space. This is caused by
James Wood> applying .strip() on line 209 of engine/tabcreatedb.py (in
James Wood> phrase_parser). I can't see start stripping being helpful,
James Wood> and since it restricts functionality, I think it should be
James Wood> replaced by .rstrip() (as well as possibly some other uses
James Wood> of .strip() in the same file).

Comment 1 Mike FABIAN 2015-04-13 10:33:36 UTC
diff --git a/engine/tabcreatedb.py b/engine/tabcreatedb.py
index fd28dcf..880a6d1 100644
--- a/engine/tabcreatedb.py
+++ b/engine/tabcreatedb.py
@@ -224,7 +224,7 @@ def main ():
         for l in f:
             if type(l) != type(u''):
                 l = l.decode('utf-8')
-            xingma, phrase, freq = l.strip().split('\t')[:3]
+            xingma, phrase, freq = l.split('\t')[:3]
             if phrase == 'NOSYMBOL':
                 phrase = u''
             list.append ( (xingma, phrase, int(freq), 0) )

Comment 3 Mike FABIAN 2016-07-06 06:28:38 UTC
Fixed.


Note You need to log in before you can comment on or make changes to this bug.