Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
cfb7606a
Commit
cfb7606a
authored
Jan 28, 2018
by
Denis Gladkikh
Committed by
Jesse Beder
Jan 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tag parsing with () (#532)
parent
86ae3a5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
src/exp.h
+4
-4
test/integration/load_node_test.cpp
+6
-0
No files found.
src/exp.h
View file @
cfb7606a
...
@@ -135,7 +135,7 @@ inline const RegEx& URI() {
...
@@ -135,7 +135,7 @@ inline const RegEx& URI() {
return
e
;
return
e
;
}
}
inline
const
RegEx
&
Tag
()
{
inline
const
RegEx
&
Tag
()
{
static
const
RegEx
e
=
Word
()
||
RegEx
(
"#;/?:@&=+$_.~*'"
,
REGEX_OR
)
||
static
const
RegEx
e
=
Word
()
||
RegEx
(
"#;/?:@&=+$_.~*'
()
"
,
REGEX_OR
)
||
(
RegEx
(
'%'
)
+
Hex
()
+
Hex
());
(
RegEx
(
'%'
)
+
Hex
()
+
Hex
());
return
e
;
return
e
;
}
}
...
@@ -200,7 +200,7 @@ inline const RegEx& Chomp() {
...
@@ -200,7 +200,7 @@ inline const RegEx& Chomp() {
// and some functions
// and some functions
std
::
string
Escape
(
Stream
&
in
);
std
::
string
Escape
(
Stream
&
in
);
}
}
// namespace Exp
namespace
Keys
{
namespace
Keys
{
const
char
Directive
=
'%'
;
const
char
Directive
=
'%'
;
...
@@ -216,7 +216,7 @@ const char LiteralScalar = '|';
...
@@ -216,7 +216,7 @@ const char LiteralScalar = '|';
const
char
FoldedScalar
=
'>'
;
const
char
FoldedScalar
=
'>'
;
const
char
VerbatimTagStart
=
'<'
;
const
char
VerbatimTagStart
=
'<'
;
const
char
VerbatimTagEnd
=
'>'
;
const
char
VerbatimTagEnd
=
'>'
;
}
}
// namespace Keys
}
}
// namespace YAML
#endif // EXP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#endif // EXP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
test/integration/load_node_test.cpp
View file @
cfb7606a
...
@@ -230,6 +230,12 @@ TEST(NodeTest, LoadTildeAsNull) {
...
@@ -230,6 +230,12 @@ TEST(NodeTest, LoadTildeAsNull) {
Node
node
=
Load
(
"~"
);
Node
node
=
Load
(
"~"
);
ASSERT_TRUE
(
node
.
IsNull
());
ASSERT_TRUE
(
node
.
IsNull
());
}
}
TEST
(
NodeTest
,
LoadTagWithParenthesis
)
{
Node
node
=
Load
(
"!Complex(Tag) foo"
);
EXPECT_EQ
(
node
.
Tag
(),
"!Complex(Tag)"
);
EXPECT_EQ
(
node
.
as
<
std
::
string
>
(),
"foo"
);
}
}
// namespace
}
// namespace
}
// namespace YAML
}
// namespace YAML
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment