During the config parse, comments are removed using a complex regexp,
matching (among other things) '//'. A problem arises when your
configuration contains a link of some sort (such as 'http://' ...). The
regexp then consider the '//' and what follows as a comment (and your
configuration is consequently considered corrupt).
Escapinf the '/' works for a time, but it fails as soon as you use the
'config' command at runtime, because the configuration is then
rewritten.
Therefore I changed the regexp used to match comments. It's a fairly
complex regexp though, and I'm not 100% positive my change is perfect.
Fell free to review it.
// 'conversation': max tweet in a thread
"CONVERSATION_MAX" : 30,
// 'quote' format
- "QUOTE_FORMAT" : "#comment https:\/\/twitter.com\/#owner\/status\/#tid",
+ "QUOTE_FORMAT" : "#comment https://twitter.com/#owner/status/#tid",
// 'thread' meta format
"THREAD_META_LEFT" : "(#id) #clock",
"THREAD_META_RIGHT" : "#clock (#id)",
# Regular expression for comments in config file
comment_re = re.compile(
- '(^)?[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?',
+ '(^)[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?',
re.DOTALL | re.MULTILINE
)