This commit is contained in:
Joao Paulo Magalhaes
2021-11-04 17:55:27 +00:00
parent fcd112b5bc
commit 6993a7c56f
6 changed files with 337 additions and 588 deletions

View File

@@ -1,291 +0,0 @@
# -*- coding: utf-8; mode: python -*-
##
## https://pypi.org/project/gitchangelog/
##
## Format
##
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
##
## Description
##
## ACTION is one of 'chg', 'fix', 'new'
##
## Is WHAT the change is about.
##
## 'chg' is for refactor, small improvement, cosmetic changes...
## 'fix' is for bug fixes
## 'new' is for new features, big improvement
##
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
##
## Is WHO is concerned by the change.
##
## 'dev' is for developpers (API changes, refactors...)
## 'usr' is for final users (UI changes)
## 'pkg' is for packagers (packaging changes)
## 'test' is for testers (test only related changes)
## 'doc' is for doc guys (doc only changes)
##
## COMMIT_MSG is ... well ... the commit message itself.
##
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
##
## They are preceded with a '!' or a '@' (prefer the former, as the
## latter is wrongly interpreted in github.) Commonly used tags are:
##
## 'refactor' is obviously for refactoring code only
## 'minor' is for a very meaningless change (a typo, adding a comment)
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
## 'wip' is for partial functionality but complete subfunctionality.
##
## Example:
##
## new: usr: support of bazaar implemented
## chg: re-indentend some lines !cosmetic
## new: dev: updated code to be compatible with last version of killer lib.
## fix: pkg: updated year of licence coverage.
## new: test: added a bunch of test around user usability of feature X.
## fix: typo in spelling my name in comment. !minor
##
## Please note that multi-line commit message are supported, and only the
## first line will be considered as the "summary" of the commit message. So
## tags, and other rules only applies to the summary. The body of the commit
## message will be displayed in the changelog without reformatting.
##
## ``ignore_regexps`` is a line of regexps
##
## Any commit having its full commit message matching any regexp listed here
## will be ignored and won't be reported in the changelog.
##
ignore_regexps = [
r'@minor', r'!minor',
r'@cosmetic', r'!cosmetic',
r'@refactor', r'!refactor',
r'@wip', r'!wip',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
r'^$', ## ignore commits with empty messages
]
## ``section_regexps`` is a list of 2-tuples associating a string label and a
## list of regexp
##
## Commit messages will be classified in sections thanks to this. Section
## titles are the label, and a commit is classified under this section if any
## of the regexps associated is matching.
##
## Please note that ``section_regexps`` will only classify commits and won't
## make any changes to the contents. So you'll probably want to go check
## ``subject_process`` (or ``body_process``) to do some changes to the subject,
## whenever you are tweaking this variable.
##
section_regexps = [
('New', [
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Changes', [
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Fix', [
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Other', None ## Match all lines
),
]
## ``body_process`` is a callable
##
## This callable will be given the original body and result will
## be used in the changelog.
##
## Available constructs are:
##
## - any python callable that take one txt argument and return txt argument.
##
## - ReSub(pattern, replacement): will apply regexp substitution.
##
## - Indent(chars=" "): will indent the text with the prefix
## Please remember that template engines gets also to modify the text and
## will usually indent themselves the text if needed.
##
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
##
## - noop: do nothing
##
## - ucfirst: ensure the first letter is uppercase.
## (usually used in the ``subject_process`` pipeline)
##
## - final_dot: ensure text finishes with a dot
## (usually used in the ``subject_process`` pipeline)
##
## - strip: remove any spaces before or after the content of the string
##
## - SetIfEmpty(msg="No commit message."): will set the text to
## whatever given ``msg`` if the current text is empty.
##
## Additionally, you can `pipe` the provided filters, for instance:
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
#body_process = noop
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
## ``subject_process`` is a callable
##
## This callable will be given the original subject and result will
## be used in the changelog.
##
## Available constructs are those listed in ``body_process`` doc.
subject_process = (strip |
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
SetIfEmpty("No commit message.") | ucfirst | final_dot)
## ``tag_filter_regexp`` is a regexp
##
## Tags that will be used for the changelog must match this regexp.
##
tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'
## ``unreleased_version_label`` is a string or a callable that outputs a string
##
## This label will be used as the changelog Title of the last set of changes
## between last valid tag and HEAD if any.
unreleased_version_label = "(unreleased)"
## ``output_engine`` is a callable
##
## This will change the output format of the generated changelog file
##
## Available choices are:
##
## - rest_py
##
## Legacy pure python engine, outputs ReSTructured text.
## This is the default.
##
## - mustache(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mustache/*.tpl``.
## Requires python package ``pystache``.
## Examples:
## - mustache("markdown")
## - mustache("restructuredtext")
##
## - makotemplate(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mako/*.tpl``.
## Requires python package ``mako``.
## Examples:
## - makotemplate("restructuredtext")
##
#output_engine = rest_py
#output_engine = mustache("restructuredtext")
output_engine = mustache("markdown")
#output_engine = makotemplate("restructuredtext")
## ``include_merge`` is a boolean
##
## This option tells git-log whether to include merge commits in the log.
## The default is to include them.
include_merge = True
## ``log_encoding`` is a string identifier
##
## This option tells gitchangelog what encoding is outputed by ``git log``.
## The default is to be clever about it: it checks ``git config`` for
## ``i18n.logOutputEncoding``, and if not found will default to git's own
## default: ``utf-8``.
#log_encoding = 'utf-8'
## ``publish`` is a callable
##
## Sets what ``gitchangelog`` should do with the output generated by
## the output engine. ``publish`` is a callable taking one argument
## that is an interator on lines from the output engine.
##
## Some helper callable are provided:
##
## Available choices are:
##
## - stdout
##
## Outputs directly to standard output
## (This is the default)
##
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start())
##
## Creates a callable that will parse given file for the given
## regex pattern and will insert the output in the file.
## ``idx`` is a callable that receive the matching object and
## must return a integer index point where to insert the
## the output in the file. Default is to return the position of
## the start of the matched string.
##
## - FileRegexSubst(file, pattern, replace, flags)
##
## Apply a replace inplace in the given file. Your regex pattern must
## take care of everything and might be more complex. Check the README
## for a complete copy-pastable example.
##
# publish = FileInsertIntoFirstRegexMatch(
# "CHANGELOG.rst",
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
# idx=lambda m: m.start(1)
# )
#publish = stdout
## ``revs`` is a list of callable or a list of string
##
## callable will be called to resolve as strings and allow dynamical
## computation of these. The result will be used as revisions for
## gitchangelog (as if directly stated on the command line). This allows
## to filter exaclty which commits will be read by gitchangelog.
##
## To get a full documentation on the format of these strings, please
## refer to the ``git rev-list`` arguments. There are many examples.
##
## Using callables is especially useful, for instance, if you
## are using gitchangelog to generate incrementally your changelog.
##
## Some helpers are provided, you can use them::
##
## - FileFirstRegexMatch(file, pattern): will return a callable that will
## return the first string match for the given pattern in the given file.
## If you use named sub-patterns in your regex pattern, it'll output only
## the string matching the regex pattern named "rev".
##
## - Caret(rev): will return the rev prefixed by a "^", which is a
## way to remove the given revision and all its ancestor.
##
## Please note that if you provide a rev-list on the command line, it'll
## replace this value (which will then be ignored).
##
## If empty, then ``gitchangelog`` will act as it had to generate a full
## changelog.
##
## The default is to use all commits to make the changelog.
#revs = ["^1.0.3", ]
#revs = [
# Caret(
# FileFirstRegexMatch(
# "CHANGELOG.rst",
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
# "HEAD"
#]
revs = []

60
.github/release.sh vendored
View File

@@ -1,12 +1,16 @@
#!/bin/bash
# useful to iterate when fixing the release:
# ver=0.2.1 ; ( set -x ; git tag -d v$ver ; git push origin :v$ver ) ; (set -x ; set -e ; tbump --only-patch --non-interactive $ver ; git add -u ; git commit --amend --no-edit ; git tag --annotate --message "v$ver" "v$ver" ; git push -f --tags origin )
function c4_release_create()
{
( \
set -euxo pipefail ; \
ver=$(_c4_validate_ver $1) ; \
branch=${2:-$(git rev-parse --abbrev-ref HEAD)} ; \
branch=$(_c4_validate_branch) ; \
c4_release_bump $ver ; \
c4_release_commit $ver $branch \
)
@@ -17,7 +21,7 @@ function c4_release_redo()
( \
set -euxo pipefail ; \
ver=$(_c4_validate_ver $1) ; \
branch=${2:-$(git rev-parse --abbrev-ref HEAD)} ; \
branch=$(_c4_validate_branch) ; \
c4_release_delete $ver ; \
c4_release_bump $ver ; \
c4_release_amend $ver $branch \
@@ -38,13 +42,11 @@ function c4_release_commit()
( \
set -euxo pipefail ; \
ver=$(_c4_validate_ver $1) ; \
branch=${2:-$(git rev-parse --abbrev-ref HEAD)} ; \
branch=$(_c4_validate_branch) ; \
tag=v$ver ; \
git add -u ; \
git commit -m $tag ; \
git tag --annotate --message $tag $tag ; \
git push origin $branch ; \
git push --tags origin $tag \
)
}
@@ -53,13 +55,11 @@ function c4_release_amend()
( \
set -euxo pipefail ; \
ver=$(_c4_validate_ver $1) ; \
branch=${2:-$(git rev-parse --abbrev-ref HEAD)} ; \
branch=$(_c4_validate_branch) ; \
tag=v$ver ; \
git add -u ; \
git commit --amend -m $tag ; \
git tag --annotate --message $tag $tag ; \
git push -f origin $branch ; \
git push -f --tags origin $tag \
)
}
@@ -73,6 +73,30 @@ function c4_release_delete()
)
}
function c4_release_push()
{
( \
set -euxo pipefail ; \
ver=$(_c4_validate_ver $1) ; \
branch=$(_c4_validate_branch) ; \
tag=v$ver ; \
git push origin $branch ; \
git push --tags origin $tag \
)
}
function c4_release_force_push()
{
( \
set -euxo pipefail ; \
ver=$(_c4_validate_ver $1) ; \
branch=$(_c4_validate_branch) ; \
tag=v$ver ; \
git push -f origin $branch ; \
git push -f --tags origin $tag \
)
}
function _c4_validate_ver()
{
ver=$1
@@ -82,8 +106,24 @@ function _c4_validate_ver()
ver=$(echo $ver | sed "s:v\(.*\):\1:")
#sver=$(echo $ver | sed "s:\([0-9]*\.[0-9]*\..[0-9]*\).*:\1:")
if [ ! -f changelog/$ver.md ] ; then \
echo "ERROR: could not find changelog/$ver.md"
exit 1
if [ -f changelog/current.md ] ; then
git mv changelog/current.md changelog/$ver.md
touch changelog/current.md
git add changelog/current.md
else
echo "ERROR: could not find changelog/$ver.md or changelog/current.md"
exit 1
fi
fi
echo $ver
}
function _c4_validate_branch()
{
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" != "master" ] ; then
echo "ERROR: release branch must be master"
exit 1
fi
echo $branch
}

View File

@@ -4,7 +4,7 @@ project(ryml
DESCRIPTION "Rapid YAML parsing and emitting"
HOMEPAGE_URL "https://github.com/biojppm/rapidyaml"
LANGUAGES CXX)
c4_project(VERSION 0.2.2 STANDALONE
c4_project(VERSION 0.2.3 STANDALONE
AUTHOR "Joao Paulo Magalhaes <dev@jpmag.me>")

285
changelog/0.2.3.md Normal file
View File

@@ -0,0 +1,285 @@
This release is focused on bug fixes and compliance with the [YAML test suite](https://github.com/yaml/yaml-test-suite).
### New features
- Add support for CPU architectures aarch64, ppc64le, s390x.
- Update c4core to [0.1.7](https://github.com/biojppm/c4core/releases/tag/v0.1.7)
- `Tree` and `NodeRef`: add document getter `doc()` and `docref()`
```c++
Tree tree = parse(R"(---
doc0
---
doc1
)");
NodeRef stream = t.rootref();
assert(stream.is_stream());
// tree.doc(i): get the index of the i-th doc node.
// Equivalent to tree.child(tree.root_id(), i)
assert(tree.doc(0) == 1u);
assert(tree.doc(1) == 2u);
// tree.docref(i), same as above, return NodeRef
assert(tree.docref(0).val() == "doc0");
assert(tree.docref(1).val() == "doc1");
// stream.doc(i), same as above, given NodeRef
assert(stream.doc(0).val() == "doc0");
assert(stream.doc(1).val() == "doc1");
```
### Fixes
- Fix compilation with `C4CORE_NO_FAST_FLOAT` ([PR #163](https://github.com/biojppm/rapidyaml/pull/163))
#### Flow maps
- Fix parse of multiline plain scalars inside flow maps ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case UT92
# all parsed as "matches %": 20
- { matches
% : 20 }
- { matches
%: 20 }
- { matches
%:
20 }
```
#### Tags
- Fix parsing of tags followed by comments in sequences ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case 735Y
- !!map # Block collection
foo : bar
```
#### Quoted scalars
- Fix filtering of tab characters in quoted scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
---
# test case 5GBF
"Empty line
<TAB>
as a line feed"
# now correctly parsed as "Empty line\nas a line feed"
---
# test case PRH3
' 1st non-empty
<SPC>2nd non-empty<SPC>
<TAB>3rd non-empty '
# now correctly parsed as " 1st non-empty\n2nd non-empty 3rd non-empty "
```
- Fix filtering of backslash characters in double-quoted scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test cases NP9H, Q8AD
"folded<SPC>
to a space,<TAB>
<SPC>
to a line feed, or <TAB>\
\ <TAB>non-content"
# now correctly parsed as "folded to a space,\nto a line feed, or \t \tnon-content"
```
- Ensure filtering of multiline quoted scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# all scalars now correctly parsed as "quoted string",
# both for double and single quotes
---
"quoted
string"
--- "quoted
string"
---
- "quoted
string"
---
- "quoted
string"
---
"quoted
string": "quoted
string"
---
"quoted
string": "quoted
string"
```
#### Block scalars
- Ensure no newlines are added when emitting block scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161))
- Fix parsing of block spec with both chomping and indentation: chomping may come before or after the indentation ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# the block scalar specs below now have the same effect.
# test cases: D83L, P2AD
- |2-
explicit indent and chomp
- |-2
chomp and explicit indent
```
- Fix [inference of block indentation](https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator) with leading blank lines ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test cases: 4QFQ, 7T8X
- >
# child1
# parsed as "\n\n child1"
--- # test case DWX9
|
literal
text
# Comment
# parsed as "\n\nliteral\n \n\ntext\n"
```
- Fix parsing of same-indentation block scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case W4TN
# all docs have the same value: "%!PS-Adobe-2.0"
--- |
%!PS-Adobe-2.0
...
--- >
%!PS-Adobe-2.0
...
--- |
%!PS-Adobe-2.0
...
--- >
%!PS-Adobe-2.0
...
--- |
%!PS-Adobe-2.0
--- >
%!PS-Adobe-2.0
--- |
%!PS-Adobe-2.0
--- >
%!PS-Adobe-2.0
```
- Folded block scalars: fix folding of newlines at the border of indented parts ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case 6VJK
# now correctly parsed as "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n"
>
Sammy Sosa completed another
fine season with great stats.
63 Home Runs
0.288 Batting Average
What a year!
---
# test case MJS9
# now correctly parsed as "foo \n\n \t bar\n\nbaz\n"
>
foo<SPC>
<SPC>
<SPC><TAB><SPC>bar
baz
```
- Folded block scalars: fix folding of newlines when the indented part is at the begining of the scalar ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case F6MC
a: >2
more indented
regular
# parsed as a: " more indented\nregular\n"
b: >2
more indented
regular
# parsed as b: "\n\n more indented\nregular\n"
```
#### Plain scalars
- Fix parsing of whitespace within plain scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
---
# test case NB6Z
key:
value
with
tabs
tabs
foo
bar
baz
# is now correctly parsed as "value with\ntabs tabs\nfoo\nbar baz"
---
# test case 9YRD, EX5H (trailing whitespace)
a
b
c
d
e
# is now correctly parsed as "a b c d\ne"
```
- Fix parsing of unindented plain scalars at the root level scope ([PR #161](https://github.com/biojppm/rapidyaml/pull/161))
```yaml
--- # this parsed
Bare
scalar
is indented
# was correctly parsed as "Bare scalar is indented"
--- # but this failed to parse successfully:
Bare
scalar
is not indented
# is now correctly parsed as "Bare scalar is not indented"
--- # test case NB6Z
value
with
tabs
tabs
foo
bar
baz
# now correctly parsed as "value with\ntabs tabs\nfoo\nbar baz"
---
--- # test cases EXG3, 82AN
---word1
word2
# now correctly parsed as "---word1 word2"
```
- Fix parsing of comments within plain scalars
```yaml
# test case 7TMG
--- # now correctly parsed as "word1"
word1
# comment
--- # now correctly parsed as [word1, word2]
[ word1
# comment
, word2]
```
#### Python API
- Add missing node predicates in SWIG API definition ([PR #166](https://github.com/biojppm/rapidyaml/pull/166)):
- `is_anchor_or_ref()`
- `is_key_quoted()`
- `is_val_quoted()`
- `is_quoted()`
### Thanks
--- @mbs-c
--- @simu
--- @QuellaZhang

View File

@@ -1,285 +0,0 @@
This release is focused on bug fixes and compliance with the [YAML test suite](https://github.com/yaml/yaml-test-suite).
### New features
- Add support for CPU architectures aarch64, ppc64le, s390x.
- Update c4core to [0.1.7](https://github.com/biojppm/c4core/releases/tag/v0.1.7)
- `Tree` and `NodeRef`: add document getter `doc()` and `docref()`
```c++
Tree tree = parse(R"(---
doc0
---
doc1
)");
NodeRef stream = t.rootref();
assert(stream.is_stream());
// tree.doc(i): get the index of the i-th doc node.
// Equivalent to tree.child(tree.root_id(), i)
assert(tree.doc(0) == 1u);
assert(tree.doc(1) == 2u);
// tree.docref(i), same as above, return NodeRef
assert(tree.docref(0).val() == "doc0");
assert(tree.docref(1).val() == "doc1");
// stream.doc(i), same as above, given NodeRef
assert(stream.doc(0).val() == "doc0");
assert(stream.doc(1).val() == "doc1");
```
### Fixes
- Fix compilation with `C4CORE_NO_FAST_FLOAT` ([PR #163](https://github.com/biojppm/rapidyaml/pull/163))
#### Flow maps
- Fix parse of multiline plain scalars inside flow maps ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case UT92
# all parsed as "matches %": 20
- { matches
% : 20 }
- { matches
%: 20 }
- { matches
%:
20 }
```
#### Tags
- Fix parsing of tags followed by comments in sequences ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case 735Y
- !!map # Block collection
foo : bar
```
#### Quoted scalars
- Fix filtering of tab characters in quoted scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
---
# test case 5GBF
"Empty line
<TAB>
as a line feed"
# now correctly parsed as "Empty line\nas a line feed"
---
# test case PRH3
' 1st non-empty
<SPC>2nd non-empty<SPC>
<TAB>3rd non-empty '
# now correctly parsed as " 1st non-empty\n2nd non-empty 3rd non-empty "
```
- Fix filtering of backslash characters in double-quoted scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test cases NP9H, Q8AD
"folded<SPC>
to a space,<TAB>
<SPC>
to a line feed, or <TAB>\
\ <TAB>non-content"
# now correctly parsed as "folded to a space,\nto a line feed, or \t \tnon-content"
```
- Ensure filtering of multiline quoted scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# all scalars now correctly parsed as "quoted string",
# both for double and single quotes
---
"quoted
string"
--- "quoted
string"
---
- "quoted
string"
---
- "quoted
string"
---
"quoted
string": "quoted
string"
---
"quoted
string": "quoted
string"
```
#### Block scalars
- Ensure no newlines are added when emitting block scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161))
- Fix parsing of block spec with both chomping and indentation: chomping may come before or after the indentation ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# the block scalar specs below now have the same effect.
# test cases: D83L, P2AD
- |2-
explicit indent and chomp
- |-2
chomp and explicit indent
```
- Fix [inference of block indentation](https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator) with leading blank lines ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test cases: 4QFQ, 7T8X
- >
# child1
# parsed as "\n\n child1"
--- # test case DWX9
|
literal
text
# Comment
# parsed as "\n\nliteral\n \n\ntext\n"
```
- Fix parsing of same-indentation block scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case W4TN
# all docs have the same value: "%!PS-Adobe-2.0"
--- |
%!PS-Adobe-2.0
...
--- >
%!PS-Adobe-2.0
...
--- |
%!PS-Adobe-2.0
...
--- >
%!PS-Adobe-2.0
...
--- |
%!PS-Adobe-2.0
--- >
%!PS-Adobe-2.0
--- |
%!PS-Adobe-2.0
--- >
%!PS-Adobe-2.0
```
- Folded block scalars: fix folding of newlines at the border of indented parts ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case 6VJK
# now correctly parsed as "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n"
>
Sammy Sosa completed another
fine season with great stats.
63 Home Runs
0.288 Batting Average
What a year!
---
# test case MJS9
# now correctly parsed as "foo \n\n \t bar\n\nbaz\n"
>
foo<SPC>
<SPC>
<SPC><TAB><SPC>bar
baz
```
- Folded block scalars: fix folding of newlines when the indented part is at the begining of the scalar ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
# test case F6MC
a: >2
more indented
regular
# parsed as a: " more indented\nregular\n"
b: >2
more indented
regular
# parsed as b: "\n\n more indented\nregular\n"
```
#### Plain scalars
- Fix parsing of whitespace within plain scalars ([PR #161](https://github.com/biojppm/rapidyaml/pull/161)):
```yaml
---
# test case NB6Z
key:
value
with
tabs
tabs
foo
bar
baz
# is now correctly parsed as "value with\ntabs tabs\nfoo\nbar baz"
---
# test case 9YRD, EX5H (trailing whitespace)
a
b
c
d
e
# is now correctly parsed as "a b c d\ne"
```
- Fix parsing of unindented plain scalars at the root level scope ([PR #161](https://github.com/biojppm/rapidyaml/pull/161))
```yaml
--- # this parsed
Bare
scalar
is indented
# was correctly parsed as "Bare scalar is indented"
--- # but this failed to parse successfully:
Bare
scalar
is not indented
# is now correctly parsed as "Bare scalar is not indented"
--- # test case NB6Z
value
with
tabs
tabs
foo
bar
baz
# now correctly parsed as "value with\ntabs tabs\nfoo\nbar baz"
---
--- # test cases EXG3, 82AN
---word1
word2
# now correctly parsed as "---word1 word2"
```
- Fix parsing of comments within plain scalars
```yaml
# test case 7TMG
--- # now correctly parsed as "word1"
word1
# comment
--- # now correctly parsed as [word1, word2]
[ word1
# comment
, word2]
```
#### Python API
- Add missing node predicates in SWIG API definition ([PR #166](https://github.com/biojppm/rapidyaml/pull/166)):
- `is_anchor_or_ref()`
- `is_key_quoted()`
- `is_val_quoted()`
- `is_quoted()`
### Thanks
--- @mbs-c
--- @simu
--- @QuellaZhang

View File

@@ -5,7 +5,7 @@
github_url = "https://github.com/biojppm/rapidyaml/"
[version]
current = "0.2.2"
current = "0.2.3"
# Example of a semver regexp.
# Make sure this matches current_version before