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

How can highlight specific lines in code blocks? #755

Closed
1 task
100gle opened this issue Sep 25, 2023 · 1 comment
Closed
1 task

How can highlight specific lines in code blocks? #755

100gle opened this issue Sep 25, 2023 · 1 comment

Comments

@100gle
Copy link
Contributor

100gle commented Sep 25, 2023

What version of starlight are you using?

latest

What is your idea?

The current version of Starlight doesn't seem to highlight specific lines in a code block as the Astro documentation does. For example:

```json title="package.json" del={2} ins={3} ins="astro check && tsc --noEmit && "
  "scripts": {
    "build": "astro build",
    "build": "astro check && tsc --noEmit && astro build",
  },
```

Is this because we are waiting for the integration of expressive-code into Starlight? #742

Why is this feature necessary?

I wanna to make my documentation be more readable.

Do you have examples of this feature in other projects?

No response

Participation

  • I am willing to submit a pull request for this issue.
@HiDeoo
Copy link
Member

HiDeoo commented Sep 25, 2023

Is this because we are waiting for the integration of expressive-code into Starlight? #742

Yes, the Astro documentation is already using Expressive Code which supports markers through @expressive-code/plugin-text-markers.

You can even preview it yourself already in the deploy preview of #742, e.g. this page.

@100gle 100gle closed this as completed Sep 25, 2023
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

No branches or pull requests

2 participants