Skip to content

Highlight additional Conda package names separately#805

Open
bdice wants to merge 1 commit into
rapidsai:mainfrom
bdice:fix/highlight-additional-package-names
Open

Highlight additional Conda package names separately#805
bdice wants to merge 1 commit into
rapidsai:mainfrom
bdice:fix/highlight-additional-package-names

Conversation

@bdice

@bdice bdice commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • highlight only package names in additional Conda package specifications
  • leave channel prefixes, quotes, and version constraints unhighlighted
  • handle mappings that expand to multiple packages, such as networkx nx-cugraph=<version>

Impact

Additional packages now use the same package-name-only syntax highlighting as the rest of the generated Conda command.

The previous formatter wrapped the entire additional package specification in the package-name span. It also treated the NetworkX/nx-cugraph mapping as one package even though it expands to two specifications.

Closes #544.

Validation

  • exercised the selector's actual JavaScript with Node assertions covering plain, pinned, channel-qualified, quoted, and multi-package specifications
  • verified the generated Conda command for NetworkX/nx-cugraph and PyTorch
  • ran pre-commit run --all-files

@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for docs-rapids-ai ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f2541d0
🔍 Latest deploy log https://app.netlify.com/projects/docs-rapids-ai/deploys/6a45c9923f019300087fe9b3
😎 Deploy Preview https://deploy-preview-805--docs-rapids-ai.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.

@bdice

bdice commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

This is now working as desired. Previously the pinnings for nx-cugraph and pytorch were not rendering correctly.

Incorrect (before):

image

Fixed (after):

image

@bdice bdice marked this pull request as ready for review July 2, 2026 02:18
@bdice bdice requested a review from a team as a code owner July 2, 2026 02:18
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.

[FEA] Highlight Additional Package Name

1 participant