[Xfce4-commits] <midori:master> Strip leading and trailing whitespace when parsing user scripts/ style

Christian Dywan noreply at xfce.org
Sat Feb 12 16:44:01 CET 2011


Updating branch refs/heads/master
         to 27bba3c318cabe8c0a08e84e9c84e3a577555798 (commit)
       from 42bf6f5c61f7e469668968ac816f67f91f8dee7a (commit)

commit 27bba3c318cabe8c0a08e84e9c84e3a577555798
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Sat Feb 12 16:04:36 2011 +0100

    Strip leading and trailing whitespace when parsing user scripts/ style

 extensions/addons.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index 74ff22c..4cef986 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -937,6 +937,7 @@ js_metadata_from_file (const gchar* filename,
     while (g_io_channel_read_line (channel, &line, NULL, NULL, NULL)
            == G_IO_STATUS_NORMAL)
     {
+        g_strstrip (line);
         if (g_str_has_prefix (line, "// ==UserScript=="))
             found_meta = TRUE;
         else if (found_meta)
@@ -1011,6 +1012,7 @@ css_metadata_from_file (const gchar* filename,
     while (g_io_channel_read_line (channel, &line, NULL, NULL, NULL)
            == G_IO_STATUS_NORMAL)
     {
+        g_strstrip (line);
         if (g_str_has_prefix (line, "@-moz-document") || line_has_meta)
         { /* FIXME: We merely look for includes. We should honor blocks. */
              if (includes)



More information about the Xfce4-commits mailing list