Skip to content
Discussion options

You must be logged in to vote

as a possible feature request, do you think it would make sense / be possible to edit the linenumber feature of code blocks and instead add arbitrary strings instead?

Something like:

```py linenums="(venv)$"
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]
```

Which renders to:

(venv)$ def bubble_sort(items):
(venv)$    for i in range(len(items)):
(venv)$        for j in range(len(items) - 1 - i):
(venv)$            if items[j] > items[j + 1]:
(venv)$                items[j], items[j + 1] = items[j + 1], items[j]

but the (venv)$ is not…

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
2 replies
@flynneva
Comment options

@squidfunk
Comment options

Comment options

You must be logged in to vote
11 replies
@flynneva
Comment options

@flynneva
Comment options

@mycroftsnm
Comment options

@flynneva
Comment options

@mycroftsnm
Comment options

Answer selected by flynneva
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants