-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make sure all code snippets use language tags #654
Comments
I've started to insert tags for some of the code snippets and I stumbled on a few, that look like this:
Also: Most of the exercises do not have tags, are they supposed to have them as well? (If there is a documentation on this, that I missed, I'm happy to have a look there. :) ) |
I have a followup question for you, @loopiezlol, for some (relatively frequent) edge cases: How should code blocks be tagged that aren't in any programming language? Some examples are:
Another class of special cases would be things like the revision question in the Python insight Indentation and Commenting. This asks the user to identify the correct commenting syntax, but syntax highlighting would give the answer away rather than relying on the user's understanding of the syntax. For this specific code block, I would want to intentionally omit a language tag. Would |
@lizTheDeveloper, any thoughts on the questions that Marvin and I asked here? |
@noahbrenner, @MarvinPollock these are good points. I would tend to agree that we would actually need generic I think we might need to stay with our fork of remark-stringify @loopiezlol and update the |
@nem035 it is also true that there are a ton of code blocks that should have language tags but don't currently. Would it make any sense to define a specific language tag that means "no highlighting"? That could make the source files easier to lint, since any block without an explicit language tag would clearly be incorrect. There wouldn't be a question every time as to whether a language tag was just forgotten or if it was intentionally omitted. Since there are a number of existing code blocks marked with |
@noahbrenner true, using a designated tag like |
Any updates on this topic? It would be great to know the official preferred way of handling these types of code blocks. |
This also applies to code snippets in footnotes, revisionQuestion, practiceQuestion, not only content.
All code snippets should have language tags:
At the moment I've applied a hack that will put these by default to
bash
if they lack one. However, we need to fix these,The text was updated successfully, but these errors were encountered: