From 1c20ef52aeb2ea7ef3c23e870bd7999311348de0 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 5 Nov 2014 00:38:17 +0100 Subject: [PATCH] XPath idents can't start with a star. That is, names such as "*foo" are not valid. This was most likely a typo in the first place. --- lib/oga/xpath/lexer.rl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oga/xpath/lexer.rl b/lib/oga/xpath/lexer.rl index 4fb91ef..dd46588 100644 --- a/lib/oga/xpath/lexer.rl +++ b/lib/oga/xpath/lexer.rl @@ -194,7 +194,7 @@ module Oga # Identifiers are used for element names, namespaces, attribute names, # etc. Identifiers have to start with a letter. - identifier = '*' | [a-zA-Z*_]+ [a-zA-Z\-_0-9]*; + identifier = '*' | [a-zA-Z_]+ [a-zA-Z\-_0-9]*; action emit_identifier { emit(:T_IDENT, ts, te)