-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
new feature: auto detect snippet language #2768
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
Conversation
only try to detect after pasting and mode has not been set and default snippet language is "Auto Detect"
Insecure Use of Regular Expressions (1)More info on how to fix Insecure Use of Regular Expressions in Javascript. Insecure Use of Language/Framework API (1)More info on how to fix Insecure Use of Language/Framework API in Javascript. |
|
@ZeroX-DG my pr can not pass the check, but what it figures out has nothing to do with what I want to change. |
|
@Rokt33r Should he fix it in this PR or just leave it and you can open another PR to fix it? |
|
@ZeroX-DG It should be fixed in another pr. Please ignore it. |
browser/components/CodeEditor.js
Outdated
| }) | ||
|
|
||
| this.setMode(this.props.mode) | ||
| if (!this.props.mode && this.props.value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you check for config.editor.snippetDefaultLanguage === 'Auto Detect' here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
ZeroX-DG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Description
for #2351
add new feature: auto detect snippet language
try to detect after pasting and mode has not been set
Issue fixed
Type of changes
Checklist: