Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Nov 30, 2025

Summary

This PR implements issue #143 by adding support for curly braces { } and square brackets [ ] as equivalent delimiters to parentheses ( ) for multiline links in all parser implementations.

Changes by language:

  • JavaScript (Peggy grammar): Updated multiLineLink and multiLineValueLink rules to accept all three bracket types via new openBracket/closeBracket rules
  • Python: Modified parser to handle all bracket types in _parse_line_content, _split_lines_respecting_quotes, _find_colon_outside_quotes, _parse_values, and _parse_value functions
  • Rust (nom parser): Added open_bracket and close_bracket combinators for multiline link parsing
  • C# (PEG grammar): Added openBracket and closeBracket rules

All implementations also update the referenceSymbol patterns to exclude the new bracket characters from unquoted references.

Examples

These are now equivalent:

(id: source target)
{id: source target}
[id: source target]

Mixed delimiters also work:

(outer: {inner: value})
[outer: (inner: value)]

Tests

Added comprehensive tests for each language implementation covering:

  • Curly braces and square brackets as delimiters
  • Value links and singlets with new delimiters
  • Nested links with same delimiter types
  • Mixed delimiter types
  • Equivalence tests verifying all bracket types produce the same parsed result

Version

Bumped to 0.13.0 across all implementations.

Test plan

  • JavaScript tests pass (152 tests)
  • Python tests pass (150 tests)
  • Rust tests pass (51 single-line parser tests + all other tests)
  • C# tests (run on CI)

Closes #143

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #143
@konard konard self-assigned this Nov 30, 2025
This PR implements issue #143 by adding support for curly braces `{ }`
and square brackets `[ ]` as equivalent delimiters to parentheses `( )`
for multiline links in all parser implementations.

Changes:
- JavaScript (Peggy grammar): Updated multiLineLink and multiLineValueLink
  rules to accept all three bracket types
- Python: Modified parser to handle all bracket types in _parse_line_content,
  _split_lines_respecting_quotes, _find_colon_outside_quotes, _parse_values,
  and _parse_value functions
- Rust (nom parser): Added open_bracket and close_bracket combinators
  for multiline link parsing
- C# (PEG grammar): Added openBracket and closeBracket rules

All implementations also update the referenceSymbol patterns to exclude
the new bracket characters from unquoted references.

Version bumped to 0.13.0 across all implementations.

Closes #143

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Support more links limiters Add support for alternative bracket delimiters { } and [ ] (closes #143) Nov 30, 2025
@konard konard marked this pull request as ready for review November 30, 2025 20:20
@konard
Copy link
Member Author

konard commented Nov 30, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.551023 USD
  • Calculated by Anthropic: $5.615449 USD
  • Difference: $-2.935573 (-34.33%)
    📎 Log file uploaded as GitHub Gist (1154KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

Support more links limiters

2 participants