Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49593 - /trunk/gtk/src/YGUtils.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Sat, 02 Aug 2008 04:18:20 -0000
  • Message-id: <20080802041821.0855F2736B@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Sat Aug 2 06:18:20 2008
New Revision: 49593

URL: http://svn.opensuse.org/viewcvs/yast?rev=49593&view=rev
Log:
Forgot to contemplate for the "pre" tag in the space tweak.

Modified:
trunk/gtk/src/YGUtils.cc

Modified: trunk/gtk/src/YGUtils.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUtils.cc?rev=49593&r1=49592&r2=49593&view=diff
==============================================================================
--- trunk/gtk/src/YGUtils.cc (original)
+++ trunk/gtk/src/YGUtils.cc Sat Aug 2 06:18:20 2008
@@ -262,7 +262,7 @@
GQueue *tag_queue = g_queue_new();
int i = 0;

- gboolean was_space = TRUE;
+ gboolean was_space = TRUE, pre_mode = FALSE;
skipSpace (instr, i);

// we must add an outer tag to make GMarkup happy
@@ -318,6 +318,9 @@
tag->str[tag->len - 1] != '/')
g_string_append_c (tag, '/');

+ if (!g_ascii_strncasecmp (tag->str, "pre", 3))
+ pre_mode = !is_close;
+
// Add quoting for un-quoted attributes
for (int j = 0; j < (signed) tag->len; j++) {
if (tag->str[j] == '=') {
@@ -374,7 +377,7 @@
}

else { // Normal text
- if (g_ascii_isspace (instr[i])) {
+ if (!pre_mode && g_ascii_isspace (instr[i])) {
if (!was_space)
g_string_append_c (outp, ' ');
was_space = TRUE;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages