Skip to content
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

Updated remark typescript for highlight errors #253

Merged
merged 2 commits into from
Oct 20, 2022

Conversation

BlenderDude
Copy link
Member

There was an issue surrounding CodeBlock that had a comment requesting a highlight-line at the end of an opening curly brace. When formatted, the comment would be pushed down a line due to prettier's opinionated method of formatting it. This update changes nothing about the authoring but I updated the parsing in remark-typescript to force the comments to stay on the correct line.

Example issue:

if (exampleCheck) { // highlight-line
  ...
}

After compilation and output would look like the following:

if (exampleCheck) {
  // highlight-line
  ...
}

If you're curious, this new method (again does NOT change any authoring) now prefixes the line with a comment instead, preserving it's location during formatting:

/* highlight-line */ if (exampleCheck) {
  ...
}

@netlify
Copy link

netlify bot commented Oct 19, 2022

Deploy Preview for apollo-monodocs ready!

Name Link
🔨 Latest commit 2047581
🔍 Latest deploy log https://app.netlify.com/sites/apollo-monodocs/deploys/6350430c8a5e4700080b11d2
😎 Deploy Preview https://deploy-preview-253--apollo-monodocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@jgarrow jgarrow left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @BlenderDude 🌮

@BlenderDude BlenderDude merged commit b24efed into main Oct 20, 2022
@github-actions github-actions bot mentioned this pull request Oct 20, 2022
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.

None yet

2 participants