From a64b0aaf5f6aea915f4cd0cf2d3014f1974518c7 Mon Sep 17 00:00:00 2001 From: "Vadim A. Misbakh-Soloviov" Date: Mon, 13 Apr 2015 21:49:18 +0500 Subject: [PATCH] Fix for "name" handling in match(); Fixes #37 --- src/htmlparser/ElementNode.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/htmlparser/ElementNode.lua b/src/htmlparser/ElementNode.lua index 11a6c22..602c695 100644 --- a/src/htmlparser/ElementNode.lua +++ b/src/htmlparser/ElementNode.lua @@ -155,7 +155,7 @@ local function select(self, s) start, pos, switch, type, name, eq, quote = string.find(part, "(%(?%)?)" .. -- switch = a possible ( or ) switching the filter on or off "([:%[#.]?)" .. -- type = a possible :, [, #, or . - "(%w+)" .. -- name = 1 or more alfanumeric chars + "([%w-_\\]+)" .. -- name = 1 or more alfanumeric chars (+ hyphen, reverse slash and uderscore) "([|%*~%$!%^]?=?)" .. -- eq = a possible |=, *=, ~=, $=, !=, ^=, or = "(['\"]?)", -- quote = a ' or " delimiting a possible attribute value pos + 1 @@ -193,4 +193,4 @@ end function ElementNode:select(s) return select(self, s) end ElementNode.mt.__call = select -return ElementNode \ No newline at end of file +return ElementNode