-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
✨Feature Request: Allow wrapping code block by some special syntax like :::js:wrap
#2660
Comments
:::js:wrap
:::js:wrap
:::js:wrap
:::js:wrap
:::js:wrap
:::js:wrap
This will be difficult. Code wrapping doesn't work properly with current line number implementations. Refer #2567 (comment) |
@brc-dd I see, as I have read the related issue. Then is that reasonable to implement without compatibility with line-number? I think this is a common case, e.g. displaying long query string |
Yeah we can add the wrap feature. |
I read part of the source code, I found that the current vitepress code block does not seem to support automatic line wrapping, I will continue to pay attention to this issue Thank you developers! |
Any update? bump |
Is your feature request related to a problem? Please describe.
Is that possible to add a special syntax to enable line wrapping in code block,
e.g. something like
:::js:line-numbers
syntax, maybe:::js:wrap
?Optionally provide a global configuration and
:::js:nowrap
, the same aslineNumbers
?For a single code block, I can wrap in a
<div>
and use inline style to force child<code>
to wrap by!important
, but there's no way I can do so forcode-group
. So I guess we have to have a built-in syntax by vitepress to handle such things.And need to make sure it can be used together with
:line-numebrs
so it won't break anythingDescribe the solution you'd like
inline:
to force wrap:
to force no-wrap:
global (default to wrap or not):
Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: