tag_null
This commit is contained in:
parent
d9c35b6079
commit
3a22138af7
@ -90,16 +90,17 @@ void SingleDocParser::HandleNode(EventHandler& eventHandler) {
|
|||||||
|
|
||||||
const Token& token = m_scanner.peek();
|
const Token& token = m_scanner.peek();
|
||||||
|
|
||||||
if (token.type == Token::PLAIN_SCALAR && IsNullString(token.value)) {
|
// add non-specific tags
|
||||||
|
if (tag.empty())
|
||||||
|
tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
|
||||||
|
|
||||||
|
if (token.type == Token::PLAIN_SCALAR
|
||||||
|
&& tag.compare("?") == 0 && IsNullString(token.value)) {
|
||||||
eventHandler.OnNull(mark, anchor);
|
eventHandler.OnNull(mark, anchor);
|
||||||
m_scanner.pop();
|
m_scanner.pop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add non-specific tags
|
|
||||||
if (tag.empty())
|
|
||||||
tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
|
|
||||||
|
|
||||||
// now split based on what kind of node we should be
|
// now split based on what kind of node we should be
|
||||||
switch (token.type) {
|
switch (token.type) {
|
||||||
case Token::PLAIN_SCALAR:
|
case Token::PLAIN_SCALAR:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user