Parsing of closing XML nodes with namespaces.
This commit is contained in:
parent
7bc442a965
commit
f660b11e47
|
@ -225,7 +225,7 @@
|
||||||
'<' => start_element;
|
'<' => start_element;
|
||||||
|
|
||||||
# Regular closing tags.
|
# Regular closing tags.
|
||||||
'</' identifier '>' => {
|
'</' identifier (':' identifier)* '>' => {
|
||||||
callback_simple("on_element_end");
|
callback_simple("on_element_end");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -141,5 +141,14 @@ describe Oga::XML::Lexer do
|
||||||
[:T_ELEM_END, nil, 1]
|
[:T_ELEM_END, nil, 1]
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
example 'lex an element with a start and end namespace' do
|
||||||
|
lex('<foo:p></foo:p>').should == [
|
||||||
|
[:T_ELEM_START, nil, 1],
|
||||||
|
[:T_ELEM_NS, 'foo', 1],
|
||||||
|
[:T_ELEM_NAME, 'p', 1],
|
||||||
|
[:T_ELEM_END, nil, 1]
|
||||||
|
]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue