Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Add code block language hints#1688

Open
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-issue-1140-code-block-hints
Open

Add code block language hints#1688
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-issue-1140-code-block-hints

Conversation

@shriram-svg
Copy link
Copy Markdown

Summary

  • show code block language hints as soon as a user types a backtick or tilde fence opener
  • add a plain code block option so users can skip choosing a language
  • complete the selected hint into a full fenced code block and place the cursor inside it
  • cover the new code block hint behavior with focused Jest tests

Closes #1140.

Verification

  • npx npm@6 run lint
  • npx npm@6 run test-api -- --runInBand
  • ./node_modules/.bin/tsc --noEmit --pretty false
  • ./node_modules/.bin/prettier --check src/cloud/components/Editor/index.tsx src/cloud/lib/editor/CodeMirror.ts src/cloud/lib/editor/CodeMirror.spec.ts
  • git diff --check

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add code block hint

3 participants