-
-
Notifications
You must be signed in to change notification settings - Fork 695
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
Guidelines for languages used in fenced code blocks #999
Comments
We have a discussion about it in the documentation maintainers area on GitHub. There was also a clear conclusion on the languages to use. I will check that and post it here for public discussion. |
Does the openHAB website actually use these fenced code block languages @ghys? It seems that code blocks without a language still have syntax highlighting. Still it makes sense to have proper languages defined for each code block in case this documentation is being (re)viewed/edited on GitHub or in everyone's favorite Markdown editor. |
I think vuepress decides on its own and doesn't need the languages necessarily. |
I know it has been a long time, bit i would like to give some updeate here. Just to give a proper overview, i have searched for the definition we made some while ago. things -> java/perl (some syntaxes break the editor colors) Also @ghys explained how code highlighting was done initally:
|
The rule looks better as javascript rather than json. According to this comment (openhab/openhab-docs#999 (comment)) json is not correct I think...
Can we add this to the developer documentation? somewhere in the readme.md section ? |
@lsiepel Is it possible to instead add it to: Code analysis report.html This way it removes the load off of a volunteer reviewer and also directs anger towards a bot and also hopefully it gets noticed sooner by a dev. Also as a separate suggestion, can a bot make an automatic post on any new PR with |
@wborn Wouter, this is already a few years old - can we find a solution for that? What do you think about the ideas of the participants of the conversation? I would love if we finally can make a decision and close this. WDYT? |
Regarding the code fences, if at all possible, the best possible solution can warn that a code fence is missing code type. It can’t determine the code type to use. If I remember correctly @Confectrician was looking into some linting stuff a while ago. Maybe this can be added too. |
I think this issue can be closed when #999 (comment) is documented. It should technically be possible to detect the language of the code most of the time and add SAT findings. |
There seems to be no consistency in the languages being used for syntax highlighting in fenced code blocks. All languages known to GitHub are listed here.
Here's a list of languages (with links to examples) that I've found being used for syntax highlighting in the documentation so far:
items files
persist files
rules files
sitemap files
things files
shell / Karaf console
Perhaps we can make this a bit more consistent and document the convention in the styleguide? The result can then be used to update the documentation for making the syntax highlighting more consistent. Perhaps you also know of other content that may need some more consistent syntax highlighting?
The text was updated successfully, but these errors were encountered: