id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
2502,bad regexp.,anonymous,rjollos,You don't parenthesize your pipe-separated list of tokens_ meaning the \\b directives that you put at the beginning and end of the regexp only apply to the tokens at either end. \r\n\r\n  What you want is     \\b(abc|def|ghi|jkl)\\b     NOT    \\babc|def|ghi|jkl\\b\r\n    -- or better yet   \\b(?:abc|def|ghi|jkl)\\b\r\n\r\n(note that the list will be sorted into some arbitrary order by python based upon it's hashing algorithm_ the order you specify them in the EMOTICONS map is not relevant)\r\n\r\nBasically_ two of the emotes in your map will not be rendered_ but which two is unpredictable.\r\n\r\nWith the above list_ only the tokens 'def' and 'ghi' are successfully matched and rendered into emotes. abc and jkl are never matched and never rendered into emotes regardless of if they are surrounded by word boundaries or are substrings. \r\n\r\nWhen I tried parenthesizing the expression (thus applying the \\b directive to the beginning and end of EVERY token) I found that NOTHING is successfully matched.\r\n\r\nRemoving the \\b directives appears to work just fine - all tokens are matched_ and only if they are not substrings (in other words_ there seems to be an implicit check for word boundaries anyway).\r\n\r\nA quick check of the python tutorial shows that \\b can also be considered the sequence for the backspace character. I don't (care to) know python very well_ so I don't know if that's what you've done wrong_ and I wasn't interested in trying to find out (whitespace sensitivity lol) so I'll leave the investigation into that possibility to you.\r\n\r\nWithout the \\b directives_ there is no longer any reason to parenthesize the expression either.\r\n\r\nIn short_ your regexp seems mighty dodgy. This works just fine for me:\r\n\r\n       pattern = '|'.join([re.escape(pattern) for pattern in EMOTICONS])\r\n       yield pattern_ _replace\r\n\r\n\r\n\r\n,defect,closed,normal,EmoticonsPlugin,normal,fixed,,,0.10
