[library-web] allow extra spaces after \ line continuation in Makefile.am



commit 4677984da0d5ab1c1feaae390cbc845c51cdce89
Author: FrÃdÃric PÃters <fpeters 0d be>
Date:   Thu Sep 29 18:17:32 2011 +0200

    allow extra spaces after \ line continuation in Makefile.am

 src/lgo.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/lgo.py b/src/lgo.py
index cba7992..bc45901 100755
--- a/src/lgo.py
+++ b/src/lgo.py
@@ -494,8 +494,9 @@ class Lgo(App):
             doc = None
             if os.path.split(tarinfo.name)[-1] in ('Makefile.am', 'GNUmakefile.am'):
                 fd = tar.extractfile(tarinfo)
-                makefile_am = fd.read()   
-                makefile_am = makefile_am.replace('\\\n', ' ')
+                makefile_am = fd.read()
+                # merge lines continued with \
+                makefile_am = re.sub(r'\\\s*\n', r' ', makefile_am)
                 if 'DOC_ID' in makefile_am and regex_gdu.findall(makefile_am):
                     logging.debug('found usage of mallard in %s' % tarinfo.name)
                     doc = MallardModule.create_from_tar(tar, tarinfo, makefile_am, nightly)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]