From c85e9e3468acc219bd700d9d073f5fc92e320a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20=C5=A0egan?= Date: Sun, 5 Feb 2012 00:29:56 +0100 Subject: Ignore whitespace indentation in empty lines. Part of #922685 fix. --- intltool-extract.in | 2 +- tests/cases/gsettings.gschema.xml | 8 +++++--- tests/results/gsettings.gschema.xml.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/intltool-extract.in b/intltool-extract.in index eb6956d..5afc292 100644 --- a/intltool-extract.in +++ b/intltool-extract.in @@ -687,7 +687,7 @@ sub traverse_gsettings { } else { # for and , we normalise all # whitespace while preserving paragraph boundaries - $message = join "\n\n", map &cleanup, split/\n\n+/, $message; + $message = join "\n\n", map &cleanup, split/\n\s*\n+/, $message; } my $context = $attrs{'context'}; diff --git a/tests/cases/gsettings.gschema.xml b/tests/cases/gsettings.gschema.xml index ade9321..c88b169 100644 --- a/tests/cases/gsettings.gschema.xml +++ b/tests/cases/gsettings.gschema.xml @@ -42,10 +42,12 @@ This is a key with multiple newlines. - Paragraph one. - - + Paragraph one. Please keep the whitespace indentation in empty + lines for testing as well. + + + Paragraph two. There was never anyone who tried to make sense out of this. diff --git a/tests/results/gsettings.gschema.xml.h b/tests/results/gsettings.gschema.xml.h index 36679a4..0140c9d 100644 --- a/tests/results/gsettings.gschema.xml.h +++ b/tests/results/gsettings.gschema.xml.h @@ -11,6 +11,6 @@ char *s = C_("clock-format", "24"); char *s = N_("Time format"); char *s = C_("Time format gsettings description", "How many hours can you tell apart?"); char *s = N_("This is a key with multiple newlines."); -char *s = C_("GSettings description", "Paragraph one.\n" +char *s = C_("GSettings description", "Paragraph one. Please keep the whitespace indentation in empty lines for testing as well.\n" "\n" "Paragraph two. There was never anyone who tried to make sense out of this."); -- cgit v1.2.1