Commits

David Mugnai committed 760e07f

parser: correctly parse a string that doesn't end with a new line

Comments (0)

Files changed (1)

                 if(part2.size()) {
                     name.append(std::string(part2.data(), part2.size()));
                 }
-                auto t = new Tag{name};
-                t->attribs["id"] = "foo";
-                return t;
+                return new Tag{name};
             }, _1, qi::_2)
         ];
 
-        node %= (tag >> qi::eol);
+        node %= (tag >> (qi::eol | qi::eoi));
 
         block =
             indent(_r1)[_a = _1]