sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

feat: format code blocks at build time

Open a-hariti opened this issue 11 months ago • 3 comments

Pre-merge checklist

If you work at Sentry, you're able to merge your own PR without review, but please don't unless there's a good reason.

  • [ ] Checked Vercel preview for correctness, including links
  • [ ] PR was reviewed and approved by any necessary SMEs
  • [ ] PR was reviewed and approved by a member of the Sentry docs team

Description of changes

Format code blocks at build time in a transpilation fashion using Prettier

Ignores code blocks with diff metadata to avoid confusion due to leading + and - characters

Right now supports languages that are supported of the box by Prettier, there's room for more support for other languages through plugins

Related discussion: #9057

a-hariti avatar Mar 07 '24 13:03 a-hariti

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2024 1:52pm

vercel[bot] avatar Mar 07 '24 13:03 vercel[bot]

PHP plugin seems to choke on the top level public keyword on this line although it's a normal pattern in Laravel

I will wait on this for now until we have a clear idea of the preferred code formatting conventions among PHP developers

a-hariti avatar Mar 07 '24 14:03 a-hariti

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Mar 29 '24 07:03 getsantry[bot]