-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Block] CodeAffects the Code BlockAffects the Code Block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
Description
Formatting such as bold, italic, etc should not be run within code blocks. As we discussed internally, we are customizing a version of the code block to add __unstableDisableFormats to its RichText component, but this should probably be incorporated into this repository as well. We haven't been able to come up with a compelling use-case for allowing formatting within code blocks, and once you add Markdown-as-you-type it becomes very likely that text within code blocks gets formatted when it shouldn't (underscores, etc.).
Related discussion at pdr0wL-10Y-p2
Step-by-step reproduction instructions
- Have a code block
- Observe that you are able to format text within it, though that doesn't make sense semantically
Screenshots, screen recording, code snippet
No response
Environment info
Standalone Gutenberg (block-editor package)
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Block] CodeAffects the Code BlockAffects the Code Block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.