e7cb46
From 68843c1f3dd21a06aa2dc3637a4ffa40f6d572a8 Mon Sep 17 00:00:00 2001
e7cb46
From: Tim Lauridsen <timlau@fedoraproject.org>
e7cb46
Date: Sun, 9 Sep 2012 16:10:17 +0200
e7cb46
Subject: [PATCH] fix for option begining with rem is removed (upstream issue
e7cb46
 #28)
e7cb46
e7cb46
--
e7cb46
diff --git a/iniparse/ini.py b/iniparse/ini.py
e7cb46
index 408354d..68dd65c 100644
e7cb46
--- a/iniparse/ini.py
e7cb46
+++ b/iniparse/ini.py
e7cb46
@@ -171,7 +171,7 @@ def change_comment_syntax(comment_chars='%;#', allow_rem=False):
e7cb46
     CommentLine.regex = re.compile(regex)
e7cb46
 
e7cb46
 class CommentLine(LineType):
e7cb46
-    regex = re.compile(r'^(?P<csep>[;#]|[rR][eE][mM])'
e7cb46
+    regex = re.compile(r'^(?P<csep>[;#]|[rR][eE][mM] +)'
e7cb46
                        r'(?P<comment>.*)$')
e7cb46
 
e7cb46
     def __init__(self, comment='', separator='#', line=None):
e7cb46
--- a/tests/test_ini.py.orig	2013-07-31 13:16:19.944347042 +0200
e7cb46
+++ b/tests/test_ini.py	2013-07-31 13:16:35.806330262 +0200
e7cb46
@@ -145,7 +145,6 @@
e7cb46
         ';; this is also a comment',
e7cb46
         '; so is this   ',
e7cb46
         'Rem and this',
e7cb46
-        'remthis too!'
e7cb46
     ]
e7cb46
     def test_parsing(self):
e7cb46
         for l in self.lines:
e7cb46
-- 
e7cb46
1.7.11.4