Skip to content

[beta] Ensure compat of Prettier and remark-header-custom-ids #5192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Oct 19, 2022

Enables formatting docs pages with Prettier (handy syntax checker for code blocks).

Prettier currently applies the following diff to headings:

-## Add React in one minute {/*add-react-in-one-minute*/}
+## Add React in one minute {/* add-react-in-one-minute */}

These heading IDs were previously rejected since the leading/trailing spaces were converted to -. Now we just remove leading/trailing whitespace.

Applied Prettier to a page that showcases the change but doesn't have too many changes.

Example Page

@gaearon
Copy link
Member

gaearon commented Oct 19, 2022

i feel like i appreciate the manual control over how the code is split by lines. e.g. for places where we highlight parts, it's pretty essential to have that control.

@github-actions
Copy link

Size Changes

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

This PR introduced no changes to the javascript bundle 🙌

@eps1lon eps1lon closed this Oct 19, 2022
@eps1lon eps1lon deleted the beta/prettier-remark-header-ids branch October 19, 2022 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants