Improved Code component experience. #2925
Closed
AimForNaN
started this conversation in
Feature Requests
Replies: 1 comment 10 replies
-
Thanks for the feedback @AimForNaN. What is your use case for this? Wouldn’t you be able to use back ticks if this is what you are aiming for? ```js title="example.js"
Code goes here.
``` |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.32.1
What is your idea?
Currently, the Code component only takes in code through the
code
attribute. Instead of having the Code component be inline or a self-closing tag, it should be converted into a block component, using the body of the component as the code in the same way backticks are used.Why is this feature necessary?
Because an attribute is not the best or most convenient place to write code.
Do you have examples of this feature in other projects?
Participation
Beta Was this translation helpful? Give feedback.
All reactions