feat: support code block title #5007
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Supports title in code blocks:
The title bar design is based on the code group tabs design. Previously, support for this syntax is indirectly added by https://github.com/yuyinws/vitepress-plugin-group-icons, so I had to make sure the changes I make can still somewhat work with the plugin, however I need to patch it slightly to prevent double title bars added by us and them.
cc @yuyinws the plugin might need a new option to disable its own
[title]support if this PR is merged. I couldn't figure out an automatic way for the plugin to detect this feature.Linked Issues
fixes #3746
Additional Context
I've skipped support for title bar support for code snippets as there's no syntax to disable it at the moment. The snippets extensions always adds a title, causing it to be shown expectedly, e.g. the CLI output docs here may show
init.ansias the title.