Skip to content
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

Remove hard coded text-plain in multiple places #15182

Merged

Conversation

fcollonval
Copy link
Member

References

Follow-up of #15175

I searched for hard-coded places of text/plain and remove those not making sense (reviewers please don't hesitate to challenge that statement)

Code changes

Remove hard-coded text/plain by the default mime type constant.

User-facing changes

None

Backwards-incompatible changes

None

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@@ -27,7 +27,7 @@ export class EditorLanguageRegistry implements IEditorLanguageRegistry {
// Add default language text/plain -> No expressions to parse
this.addLanguage({
name: 'none',
mime: 'text/plain',
mime: IEditorMimeTypeService.defaultMimeType,
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about this one. It could have unexpected consequences if someone changes defaultMimeType downstream.

Copy link
Member Author

Choose a reason for hiding this comment

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

I add that parser it to avoid weird highlight with the default mimetype. But I agree that changing this feels weird. Let's keep it hard coded.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Thanks @fcollonval!

@krassowski krassowski merged commit bb711cf into jupyterlab:main Oct 10, 2023
77 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants