Skip to content

Reject non-empty content after table headers#3

Closed
dereuromark wants to merge 1 commit intomasterfrom
fix/table-header-terminator
Closed

Reject non-empty content after table headers#3
dereuromark wants to merge 1 commit intomasterfrom
fix/table-header-terminator

Conversation

@dereuromark
Copy link
Contributor

Summary

  • reject extra non-comment content after table headers such as [table] key = "value"
  • reuse the existing terminator check after parsing table headers
  • tighten parser behavior to match TOML expectations on current master

Verification

  • vendor/bin/phpunit /tmp/toml-pr-check-1984691/tests/TomlTest.php /tmp/toml-pr-check-1984691/tests/Conformance/SupportedSyntaxTest.php

Table headers like [table] must be followed by newline, comment, or EOF.
Input like `[error] this = "value"` is now correctly rejected.

Invalid tests: 445/466 (95.5%)
@dereuromark dereuromark deleted the fix/table-header-terminator branch March 25, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant