summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Šegan <danilo@segan.org>2012-02-05 00:29:56 +0100
committerDanilo Šegan <danilo@segan.org>2012-02-05 00:29:56 +0100
commitc85e9e3468acc219bd700d9d073f5fc92e320a8a (patch)
treebb42c1f63dfeb8c6573ae35d074122f43e44c2ec
parentc7dca2f9a9b6c8c6d5b6821bfc965177c5d2f4fd (diff)
downloadintltool-c85e9e3468acc219bd700d9d073f5fc92e320a8a.tar.gz
Ignore whitespace indentation in empty lines. Part of #922685 fix.
-rw-r--r--intltool-extract.in2
-rw-r--r--tests/cases/gsettings.gschema.xml8
-rw-r--r--tests/results/gsettings.gschema.xml.h2
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 <summary> and <description>, 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.
</summary>
<description context='GSettings description'>
- 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.");