• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fktn-k / fkYAML / 32367542951
100%

Build:
DEFAULT BRANCH: develop
Ran 20 Aug 2026 12:13PM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Aug 2026 12:11PM UTC coverage: 100.0%. Remained the same
32367542951

push

github

web-flow
Support empty keys in block and flow mappings (#558)

* Support empty keys in block and flow mappings

An empty key was a special case at the document root only, where it produced
an entry with an empty string key. Everywhere else a key separator without a
preceding key was rejected, and in a flow mapping it was ignored, which
dropped the entry:

```yaml
key: value
: empty key      # parse_error: Detected invalid indentation
- : foo          # parse_error: mapping key should not be empty
{ key: value, : empty key }
                 # parse_error: The ":" mapping value indicator must be
                 # followed after a mapping key
```

Parse an empty key as a null node, as the YAML specification does, and add the
entry wherever a key separator is found with no key before it: at the start of
a line in a block mapping, in a block sequence entry, and in a flow mapping.
The value of an empty key can be omitted as well, so add_empty_key_entry()
also moves back to the parent mapping when the following token is not indented
deeper, the same way an omitted value is handled for a normal key.

This changes the type of an empty key from an empty string to a null node,
which is a breaking change for anyone reading such an entry as node[""].
A quoted empty key ("": value) is unaffected and remains a string.

Spec example 8.18 (test suite case S3PD) and the empty key cases NKF9 and PW8X
of the yaml-test-suite now parse. CFD4 (an empty key in a single pair flow
sequence) is still rejected: it needs single pair flow mappings, which are not
supported for non-empty keys either ([foo: 1] is rejected as well).

* Parse a key separator which begins the contents of an explicit key

The contents of an explicit key may themselves be a mapping entry with an
empty key, as pointed out in #557: `? ` introduces an explicit key, and the
`:` which follows it on the same line belongs to that key rather than to the
entry the key is part of.

Handle a key separator which begins the ... (continued)

1530 of 1530 branches covered (100.0%)

Branch coverage included in aggregate %.

48 of 48 new or added lines in 1 file covered. (100.0%)

5363 of 5363 relevant lines covered (100.0%)

1718.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32367542951.1 20 Aug 2026 12:13PM UTC 32
100.0
GitHub Action Run
Source Files on build 32367542951
  • Tree
  • List 32
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #32367542951
  • 3e95e42a on github
  • Prev Build on develop (#32361203435)
  • Next Build on develop (#32447055658)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc