dlang-community / D-YAML

YAML parser and emitter for the D programming language
https://dlang-community.github.io/D-YAML/
Boost Software License 1.0
118 stars 38 forks source link

Fix #309: Not to include `\0` in the resulted token by `scanBlockScalar` #310

Closed tom-tan closed 1 year ago

tom-tan commented 1 year ago

This request fixes #309 by changing scanBlockScalar not to include \0 in the resulted token. I also added a unittest for it.

codecov[bot] commented 1 year ago

Codecov Report

Merging #310 (7939f44) into master (acba077) will increase coverage by 0.00%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/dlang-community/D-YAML/pull/310/graphs/tree.svg?width=650&height=150&src=pr&token=3GhqwvvAYo&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community)](https://codecov.io/gh/dlang-community/D-YAML/pull/310?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community) ```diff @@ Coverage Diff @@ ## master #310 +/- ## ======================================= Coverage 95.20% 95.20% ======================================= Files 29 29 Lines 4564 4569 +5 ======================================= + Hits 4345 4350 +5 Misses 219 219 ``` | [Impacted Files](https://codecov.io/gh/dlang-community/D-YAML/pull/310?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community) | Coverage Δ | | |---|---|---| | [source/dyaml/scanner.d](https://codecov.io/gh/dlang-community/D-YAML/pull/310/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community#diff-c291cmNlL2R5YW1sL3NjYW5uZXIuZA==) | `99.65% <100.00%> (+<0.01%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/dlang-community/D-YAML/pull/310?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/dlang-community/D-YAML/pull/310?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community). Last update [acba077...7939f44](https://codecov.io/gh/dlang-community/D-YAML/pull/310?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dlang-community).
Herringway commented 1 year ago

Simple and tested, just the way I like it. Thanks!