Skip to content

Conversation

@staticpayload
Copy link

Summary

  • render Prism using the raw code input before stripping magic comments
  • derive magic-comment line classes from tokenized lines to keep line numbers stable
  • add token-based parsing tests

Fixes #8550

Testing

  • corepack yarn test packages/docusaurus-theme-common/src/utils/tests/codeBlockUtils.test.ts

@meta-cla
Copy link

meta-cla bot commented Jan 12, 2026

Hi @staticpayload!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@staticpayload staticpayload marked this pull request as draft January 12, 2026 18:17
@meta-cla
Copy link

meta-cla bot commented Jan 12, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Jan 12, 2026
@staticpayload staticpayload marked this pull request as ready for review January 12, 2026 18:41
@staticpayload
Copy link
Author

Netlify deploy preview was failing with a Rspack panic ("should be pending if module is not in the module graph"). I pushed 8c42123 to set deploy-preview env flags and in so previews avoid that crash. Netlify is rerunning.

@staticpayload
Copy link
Author

Note: the deploy-preview env change is in website/netlify.toml under [context.deploy-preview.environment].

@netlify
Copy link

netlify bot commented Jan 13, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 8c42123
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6965c2712b1a3f000848832b
😎 Deploy Preview https://deploy-preview-11655--docusaurus-2.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 project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MagicComments should be applied after Prism tokenization to properly track line numbers

1 participant