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

Language detection not working correctly #13

Open
Pencilcaseman opened this issue Feb 5, 2022 · 3 comments
Open

Language detection not working correctly #13

Pencilcaseman opened this issue Feb 5, 2022 · 3 comments

Comments

@Pencilcaseman
Copy link

Pencilcaseman commented Feb 5, 2022

I think there is an issue with the automatic language detection, as the code highlighting doesn't appear to match the language being used.

For example, if I put this code directly into Carbon (with language="auto"), I get the following output:

carbon (4)

However, if I put the exact same code into an issue it doesn't get formatted in the same way (using all default settings):


View raw code

# This is a comment
def main():
    print("Hello, World")


@callmekatootie
Copy link
Owner

So - just a heads up - for python, it seems like the official plugin has been deprecated and they recommend to use Black instead.

So it appears that I may not be able to support python just yet. Will still keep this ticket open to allow supporting other plugins

@Pencilcaseman
Copy link
Author

That's interesting. Thanks for the quick reply! Re-reading my issue, however, I think I mis-phrased my question and meant that the syntax highlighting isn't quite the same. Is there a way I can make it automatically change based on the language?

@callmekatootie
Copy link
Owner

By default, prettier support web based languages (js, html, css...)

So, the syntax highlighting does (should) detect the language to apply the style. Except it does not support all the languages. I need to check how carbon's website does it

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

No branches or pull requests

2 participants