Skip to content

Need code line high-light #16

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

Closed
coanor opened this issue Mar 7, 2023 · 2 comments
Closed

Need code line high-light #16

coanor opened this issue Mar 7, 2023 · 2 comments
Labels
enhancement Enhancement request good first issue Good for newcomers

Comments

@coanor
Copy link

coanor commented Mar 7, 2023

Is your feature request related to a problem? Please describe.
For large code blocks, we need high-light effect on specific lines, these high light lines are better to explain and anwser the question.

Describe the solution you'd like
Like code line high-light in mkdocs material, the high-light syntax looks like this:

``` py hl_lines="2 3"
def bubble_sort(items):
    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]
```

and we get the effect:

image

@coanor coanor added the enhancement Enhancement request label Mar 7, 2023
@fenbox fenbox transferred this issue from apache/answer Aug 24, 2023
@Kota-Karthik
Copy link

@coanor I am interested in doing this issue
so kindly assign me this

@fenbox
Copy link
Member

fenbox commented Jan 30, 2024

@Kota-Karthik Thank you. Looking forward to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

3 participants