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
Language recognition for code blocks #16263
base: master
Are you sure you want to change the base?
Conversation
…k the language As described in issue 12212
WalkthroughThe recent updates to the CKEditor5's autoformat feature enhance the handling of code blocks. The modifications allow users to specify the programming language immediately after typing the triple backticks, which aligns with common markdown practices. This update improves the user experience by enabling language-specific formatting as soon as a code block is initiated. Changes
Assessment against linked issues
In summary, the changes effectively address the objectives outlined in the linked issue #12212, enhancing the functionality of the CKEditor5 autoformat feature to include language-specific code blocks that are initiated with either a space or an enter key, mimicking common markdown behaviors. Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Additional Context UsedLanguageTool (7)
Additional comments not posted (10)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
I signed the CLA, but the signature had my username twice (theannachen theannachen). I don't know if that's pertinent. |
Also closes #15860 |
Type autoformat: Adds new autoformatting for language selection. Closes #12212 .
Type codeblock: Closes #12212 .
Functionality Changes
Codeblocks can no longer be created by "
" and must contain a space after the triple graves (i.e. "
").Instead of the default or the last language always being used by the shortcut, codeblocks can now be created with specific languages by adding them after the
, such as
python. After the name, the space will then create the block.If the language used is not a valid language, it will create an undefined codeblock.
Summary by CodeRabbit