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

Reminder to enter programming language #1761

Closed
XavierRex opened this issue Feb 20, 2023 · 6 comments
Closed

Reminder to enter programming language #1761

XavierRex opened this issue Feb 20, 2023 · 6 comments
Labels

Comments

@XavierRex
Copy link

If someone needs to write code in the response then after typing ``` should be reminder to enter the programming language so that the colored syntax of the programming language can work.

@jwstolk
Copy link

jwstolk commented Feb 20, 2023

If no specific programming language is given after the ```, could the language automatically be detected? Unlike spelling corrections, syntax highlighting should never affect the conversation, so automating this is pretty safe. (unless the conversion starts referring to specific terms in the code by color...)

@bitplane
Copy link
Collaborator

It'd be pretty tough and depend on the context more than anything. Lots of languages are based on C and so look pretty similar, there are tells but the context of the thread is probably the best way to tell.

@horribleCodes
Copy link
Contributor

That's something that could be included in the guidelines. If there's no downside to specifying the language and it makes the reply more readable, we should urge users to include them.

@mashdragon
Copy link
Contributor

If no specific programming language is given after the ```, could the language automatically be detected? Unlike spelling corrections, syntax highlighting should never affect the conversation, so automating this is pretty safe. (unless the conversion starts referring to specific terms in the code by color...)

Having the correct programming language in the dataset is much better than detecting it on the fly in my opinion. However, maybe we could use a programming language detector and suggest a specific language to the user.

Sometimes people don't know what markdown abbreviation to use for the language specifier, so I think some form of suggestion might give the best results.

@horribleCodes
Copy link
Contributor

horribleCodes commented Feb 22, 2023

Sometimes people don't know what markdown abbreviation to use for the language specifier, so I think some form of suggestion might give the best results.

I added a link to a document of the supported languages both in the task and the guidelines. Hopefully it's enough to motivate anyone who sees it to include the specifier.

andreaskoepf pushed a commit that referenced this issue Feb 22, 2023
Addresses #1761. It's no autodetect, but we're doing our best to make
the user aware.
@AbdBarho
Copy link
Collaborator

We have the comment in the guidelines, which I think is enough.

The problem is that it is totally valid markdown if you don't put the language, which makes it ambiguous. I will close this now, feel free to re-open if you think this could be better solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants