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

Fixes MultiCodeBlock highlighting consistency issue #182

Merged
merged 5 commits into from
Aug 15, 2022

Conversation

BlenderDude
Copy link
Member

Highlighting line consistency was lost during the TS->JS transpilation.

```ts {2}
type Result = void;
const test = (): Result => {};
test();
```

In the old system, line 1 would be omitted in the JS output, leaving test() to be highlighted. This was incorrect behavior and is adjusted with this new system to track line highlights.

More can be seen in the tests of the remark-typescript project remark-typescript

Screen.Recording.2022-08-11.at.4.32.03.PM.mov

The above video properly shows the new highlighting adjustment. Note how the interface is highlighted in TS, and is now properly adjusted for and collapsed for JS.

@netlify
Copy link

netlify bot commented Aug 11, 2022

Deploy Preview for apollo-monodocs ready!

Name Link
🔨 Latest commit af4867a
🔍 Latest deploy log https://app.netlify.com/sites/apollo-monodocs/deploys/62fabb6f16929c0008a1219d
😎 Deploy Preview https://deploy-preview-182--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

@StephenBarlow StephenBarlow left a comment

Choose a reason for hiding this comment

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

Seems to work correctly from where I'm sitting!

Copy link
Contributor

@trevorblades trevorblades left a comment

Choose a reason for hiding this comment

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

Great work @BlenderDude! Just noticed a few things and left some comments/suggestions. Let me know if that all makes sense 🙇

packages/chakra-helpers/src/CodeBlockTabs.tsx Outdated Show resolved Hide resolved
packages/chakra-helpers/src/CodeBlockTabs.tsx Outdated Show resolved Hide resolved
packages/chakra-helpers/src/CodeBlockTabs.tsx Outdated Show resolved Hide resolved
packages/chakra-helpers/src/CodeBlockTabs.tsx Outdated Show resolved Hide resolved
packages/chakra-helpers/src/CodeBlockTabs.tsx Outdated Show resolved Hide resolved
packages/chakra-helpers/src/helpers.ts Outdated Show resolved Hide resolved
packages/chakra-helpers/src/CodeBlock.tsx Outdated Show resolved Hide resolved
packages/chakra-helpers/src/CodeBlock.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@trevorblades trevorblades left a comment

Choose a reason for hiding this comment

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

LGTM! 🍣

@trevorblades trevorblades merged commit 51332fb into main Aug 15, 2022
@trevorblades trevorblades deleted the da/highlighting-fix branch August 15, 2022 22:39
@github-actions github-actions bot mentioned this pull request Aug 15, 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

3 participants