[gxml: 9/25] CSS : fix attribute/identifier parsing.
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml: 9/25] CSS : fix attribute/identifier parsing.
- Date: Tue, 19 Mar 2019 17:46:06 +0000 (UTC)
commit 2d11280ce68913a60125167daf7b7b3de8348e43
Author: BZHDeveloper <inizan yannick gmail com>
Date: Fri Jan 25 13:05:23 2019 +0100
CSS : fix attribute/identifier parsing.
debian/meson.build | 4 +---
gxml/CssSelectorParser.vala | 5 ++---
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/debian/meson.build b/debian/meson.build
index 8d4ac00..c010856 100644
--- a/debian/meson.build
+++ b/debian/meson.build
@@ -4,9 +4,7 @@ conf.set ('VERSION', PROJECT_VERSION)
configure_file(input : 'changelog.in',
output : 'changelog',
- configuration : conf,
- install : true,
- install_dir : meson.current_source_dir())
+ configuration : conf)
configure_file(input : 'control.in',
output : 'control',
diff --git a/gxml/CssSelectorParser.vala b/gxml/CssSelectorParser.vala
index 95428f9..f978d5b 100644
--- a/gxml/CssSelectorParser.vala
+++ b/gxml/CssSelectorParser.vala
@@ -192,7 +192,7 @@ public class GXml.CssSelectorParser : GLib.Object {
static string parse_identifier (GXml.CssString str, GXml.CssStringFunc func) {
var builder = new StringBuilder();
- while (!str.eof && is_valid_char (str.peek()) && func (str))
+ while (!str.eof && func (str))
builder.append_unichar (str.read());
return builder.str;
}
@@ -284,7 +284,6 @@ public class GXml.CssSelectorParser : GLib.Object {
str.read();
while (str.peek().isspace())
str.read();
-
var builder = new StringBuilder();
var extra_builder = new StringBuilder();
bool prefixed = false;
@@ -342,7 +341,7 @@ public class GXml.CssSelectorParser : GLib.Object {
if (str.peek() == '"' || str.peek() == '\'')
quote = str.read();
var attr_value = parse_identifier (str, s => {
- return quote == 0 && !s.peek().isspace() || quote > 0 && s.peek() != quote;
+ return quote == 0 && !s.peek().isspace() && is_valid_char (s.peek()) || quote > 0 &&
s.peek() != quote;
});
selector.value = attr_value;
if (quote > 0 && quote != str.read())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]