You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this could cause breaking changes for people that don't want this style applied to their shiki codeblock. Alternatively, a data attribute could be attached to the element, and the user can apply css targeting it.
What does the proposed API look like?
If the code block should be wrapped, apply a data-rp-code-wrapped=true attribute to the element.
Alternatively, always apply the white-space style for them, but allow it to be overridden. Or do both strategies; always apply the white-space style, but add a data-attribute that's easy to override the default styles from CSS.
What problem does this feature solve?
It was possible to enable wrapping with shiki-highlighting by conditionally adding "white-space: pre" to the code element.
However, this could cause breaking changes for people that don't want this style applied to their shiki codeblock. Alternatively, a
data
attribute could be attached to the element, and the user can apply css targeting it.What does the proposed API look like?
data-rp-code-wrapped=true
attribute to the element.Alternatively, always apply the white-space style for them, but allow it to be overridden. Or do both strategies; always apply the white-space style, but add a data-attribute that's easy to override the default styles from CSS.
The text was updated successfully, but these errors were encountered: