Skip to content

Remove length marker option#14

Merged
mattt merged 2 commits into
mainfrom
mattt/remove-length-marker
Dec 5, 2025
Merged

Remove length marker option#14
mattt merged 2 commits into
mainfrom
mattt/remove-length-marker

Conversation

@mattt
Copy link
Copy Markdown
Collaborator

@mattt mattt commented Dec 5, 2025

Linked Issue

Closes #13

Description

This PR removes the length marker option, which was removed from the v3 spec.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Changes Made

  • Remove the lengthMarker property and nested LengthMarker type in TOONEncoder
  • Remove discussion of length markers from README
  • Remove invalidated tests.

SPEC Compliance

  • This PR implements/fixes spec compliance
  • Spec section(s) affected:
  • Spec version: v3

Testing

  • All existing tests pass
  • Added new tests for changes
  • Tests cover edge cases and spec compliance

Pre-submission Checklist

  • My code follows the project's coding standards
  • I have run code formatting/linting tools
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed
  • I have reviewed the TOON specification for relevant sections

Breaking Changes

  • No breaking changes
  • Breaking changes (describe migration path below)

We will release a new minor / pre-1.0 version.

Additional Context

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the lengthMarker encoder option to align with the TOON v3 specification, which no longer includes this feature. This is a breaking change that simplifies the encoder API by removing an optional feature that prefixed array lengths with a # character in the output format.

Key changes:

  • Removed the lengthMarker property and LengthMarker enum from TOONEncoder
  • Updated all formatHeader function calls to remove the lengthMarker parameter
  • Removed encoder tests specific to the length marker feature
  • Removed documentation section explaining length marker usage

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Sources/ToonFormat/Encoder.swift Removed LengthMarker enum, lengthMarker property, and updated all formatHeader calls to exclude the length marker parameter
Tests/ToonFormatTests/EncoderTests.swift Removed 6 test functions that tested the length marker feature with various configurations
Tests/ToonFormatTests/DecoderTests.swift Removed round-trip test for length marker encoding/decoding
README.md Removed documentation section explaining the length marker feature with code examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mattt mattt merged commit 0b543ea into main Dec 5, 2025
6 checks passed
@mattt mattt deleted the mattt/remove-length-marker branch December 5, 2025 11:53
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.

Remove Length Marker Option

2 participants