From 015a4f137312e9d2a18ab839e77bf1c53696b870 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 27 Mar 2024 21:08:36 -0700 Subject: [PATCH] gnulib-tool.py: Fix whitespace in gnulib-comp.m4. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Prefix each line with the indentation string instead of using regular expressions. --- ChangeLog | 6 ++++++ pygnulib/GLEmiter.py | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa7df63120..10831fe9e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-03-28 Collin Funk + + gnulib-tool.py: Fix whitespace in gnulib-comp.m4. + * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Prefix each line with + the indentation string instead of using regular expressions. + 2024-03-27 Collin Funk gnulib-tool.py: Inline 'sed' invocations used on library files. diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index e245390aa0..efde78823d 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -225,12 +225,10 @@ class GLEmiter(object): snippet = module.getAutoconfSnippet() snippet = snippet.replace('${gl_include_guard_prefix}', include_guard_prefix) - lines = [ line + lines = [ f'{indentation}{line}' for line in snippet.split('\n') if line.strip() ] snippet = lines_to_multiline(lines) - pattern = re.compile(r'^(.*)$', re.M) - snippet = pattern.sub(r'%s\1' % indentation, snippet) if disable_libtool: snippet = snippet.replace('$gl_cond_libtool', 'false') snippet = snippet.replace('gl_libdeps', 'gltests_libdeps') -- 2.39.5