~stefanor/ibid/timeout-344882

« back to all changes in this revision

Viewing changes to ibid/plugins/misc.py

  • Committer: Jonathan Hitchcock
  • Date: 2009-03-18 11:36:41 UTC
  • Revision ID: jonathan@vhata.net-20090318113641-4nklmtfi7g4xzhgb
Anchor regular expressions properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    # Typed by a Dvorak typist on a QWERTY-mapped keyboard
67
67
    typed_on_qwerty = dict(zip(map(ord, qwermap), dvormap))
68
68
    
69
 
    @match(r'(?:asdf|dvorak)\s+(.+)')
 
69
    @match(r'^(?:asdf|dvorak)\s+(.+)$')
70
70
    def convert_from_qwerty(self, event, text):
71
71
        event.addresponse(u'%s', text.translate(self.typed_on_qwerty))
72
72
    
73
 
    @match(r'(?:aoeu|qwerty)\s+(.+)')
 
73
    @match(r'^(?:aoeu|qwerty)\s+(.+)$')
74
74
    def convert_from_dvorak(self, event, text):
75
75
        event.addresponse(u'%s', text.translate(self.typed_on_dvorak))
76
76