fktn-k / fkYAML

A C++ header-only YAML library
MIT License
69 stars 7 forks source link

Allow a dash(-) at the first character of a plain scalar #254

Closed fktn-k closed 10 months ago

fktn-k commented 10 months ago

According to the YAML spec, a dash(-) at the first character of a scalar is allowed. link
However, fkYAML didn't support such cases and threw an exception, e.g., with the following input:

foo: -bar

So, this PR has fixed the issue and the fix has also been tested by the added test cases.


Pull Request Checklist

Read the CONTRIBUTING.md file for detailed information.

Please don't

coveralls commented 10 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 1be03fdf19bc73f7b4e1f229be0395445d56a8c5 on bugfix/allow_dash_as_1st_plain_scalar_char into dc4e22d61dc2433e31be837476523b5ce413be28 on develop.