Skip to content

Fix syntax highlighting for .class files #3708

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

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Jan 13, 2025

Description

Syntax highlighting was missing when adding snippets from a Java .class file to the context. This was caused by 2 issues:

  • class was not mapped to java
  • the extension mapping would fail because the extension would contain the snippet range, like class (1-13)

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screenshots

Before
Screenshot 2025-01-13 at 16 22 32

After
Screenshot 2025-01-13 at 16 30 05

Testing instructions

void main() {
   System.out.println("Hello World!');
}
  • Ctrl+click on System to open System.class
  • highlight some code, Ctrl+L to add to the Chat context
  • the snippet should be highlighted as Java

Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit fb035de
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/67a27c6592099000089fa0e6
😎 Deploy Preview https://deploy-preview-3708--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fbricon fbricon force-pushed the fix-syntaxhighlighting branch from ea1bcd7 to ae8ab99 Compare January 13, 2025 17:07
Copy link
Contributor

@sestinj sestinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, and thanks for adding the test!

@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:01 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:01 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj merged commit 956e2a9 into continuedev:main Feb 5, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants