]> git.bzium.org - embe/man-symlinker.git/commitdiff
Obsługa komentarzy.
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Wed, 5 Oct 2011 19:33:30 +0000 (21:33 +0200)
committerMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Wed, 5 Oct 2011 19:36:46 +0000 (21:36 +0200)
man-symlinker

index aa90e385c85f483d0b4ef114f68b5b80375fa5f4..df13d0620dbbb8d0bdf20bdff2d99c90bc3026ca 100755 (executable)
@@ -22,10 +22,10 @@ def process_file(name):
         s = f.read(MAX_LEN+1)
         if len(s) > MAX_LEN:
             return False
-        s = s.strip()
-        if '\n' in s:
-            return False
-    m = SO_RE.search(s)
+    lines = [line for line in s.rstrip().split('\n') if not line.startswith('.\\"')]
+    if len(lines) != 1:
+        return False
+    m = SO_RE.search(lines[0])
     if not m:
         return False
     link = m.group(1)