Skip to content

Expose Blade formatter ignore ranges - #184

Merged
JohnathonKoster merged 2 commits into
fortephp:mainfrom
jonnywilliamson:feature/public-ignore-ranges
Aug 22, 2026
Merged

Expose Blade formatter ignore ranges#184
JohnathonKoster merged 2 commits into
fortephp:mainfrom
jonnywilliamson:feature/public-ignore-ranges

Conversation

@jonnywilliamson

Copy link
Copy Markdown
Contributor

Summary

This exposes a small getBladeIgnoreRanges() API around the ignore ranges already collected by the Blade lexer.

The returned values contain only start and end source offsets. Internal lexer resume state remains private, and the parser now shares the same collection helper so the public result follows the formatter's existing marker and syntax-plugin behavior.

The API is intended for this draft Laravel Pint change, where Pint needs to protect ignored content from its own Blade pre- and post-formatters as well as from Prettier.

Testing

  • Full test suite: 5,781 passed
  • TypeScript typecheck
  • Lint and formatting checks
  • Package build

@jonnywilliamson

Copy link
Copy Markdown
Contributor Author

Any thoughts on this or questions I can help with?

@JohnathonKoster

Copy link
Copy Markdown
Contributor

Any thoughts on this or questions I can help with?

Nope! It's on my radar, and going to include it in the next release. Wrapping up a few things behind the scenes on my end before that 👀

@JohnathonKoster
JohnathonKoster merged commit d99a70b into fortephp:main Aug 22, 2026
1 check passed
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.

2 participants