Timeline for Can we make syntax highlighting easier?
Current License: CC BY-SA 3.0
23 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 28, 2021 at 2:11 | answer | added | Laurel | timeline score: 5 | |
Apr 18, 2018 at 16:32 | comment | added | Victoria | I'd be for making a separate button with a keyboard shortcut that would open a popup dialog where you could select syntax highligting for the selected block. Languages used in the tags could have been listed on top of the list for example. | |
Apr 18, 2018 at 10:25 | comment | added | DavidG | @Tschallacka Yes, the entire list of languages is available here | |
Apr 17, 2018 at 19:07 | comment | added | Richard |
When I need to highlight, I google "syntax highlight stackoverflow" which gets me here from which I inferred language: python . language: lang-py is not something I'd've guessed, especially with language: c# as an example.
|
|
Apr 17, 2018 at 18:48 | comment | added | TylerH | @BoltClock The colors are the same to me. | |
Apr 17, 2018 at 13:28 | comment | added | duplode | @JF Cf. Support CommonMark fenced code blocks and Will CommonMark be adopted for SE? (Meta.SE). | |
Apr 17, 2018 at 11:57 | comment | added | Dimitri Mestdagh |
@Holger The only thing I sometimes forget is if it's <!-- language: ... --> or <!-- lang: ... --> . The reason why I sometimes make this mistake is because you should actually use lang-py in stead of python , so sometimes I accidentally write <!-- lang: lang-py --> . Bookmarking What is syntax highlighting and how does it work? helped a lot.
|
|
Apr 17, 2018 at 11:52 | comment | added | Jed Fox |
IMO SO should support the fenced code block style (i.e. ```python\ncode goes here\n``` )
|
|
Apr 17, 2018 at 11:34 | comment | added | Holger |
You’ve proven that there are a lot of white-space permutations possible, but, seriously, is <!-- single-space language: single-space name single-space --> really so hard to remember? There is no space before the colon, but that’s the standard typesetting on computers anyway.
|
|
Apr 17, 2018 at 8:31 | comment | added | Tschallacka | is there somewhere a list of all supported syntax highlighted languages/codes. We could then make a bookmarklet that would add a simple select list that copies the right one in. | |
Apr 17, 2018 at 3:27 | comment | added | Richard | @HansPassant: Multiple languages could be present in a question or answer, so there's ambiguity. Regardless, I this, while helpful, dodges the central issue: the current setup makes it (needlessly?) difficult to specify highlighting. | |
Apr 17, 2018 at 3:26 | comment | added | Richard | @AndréKool: I assume this applies to other languages, though I have not tested it. | |
Apr 17, 2018 at 2:29 | comment | added | BoltClock Mod | You would actually be able to display the syntax highlighting on meta without a screenshot if you used the Prettify language identifiers instead of the tag names (e.g. lang-py instead of python). The colors are much more subtle though. | |
Apr 17, 2018 at 2:27 | comment | added | BoltClock Mod | @Servy: Oddly enough, the other day I had to add lang-js hints to JS blocks on a question that was tagged [javascript] and [python], because they were being treated as Python code. | |
Apr 17, 2018 at 1:45 | comment | added | Stephen Rauch Mod | @Servy, Surely no language is more popular than Python! | |
Apr 16, 2018 at 23:06 | history | edited | BSMP | CC BY-SA 3.0 |
Changed alt text so that those who can't see the image get the information that only the first example works.
|
Apr 16, 2018 at 21:51 | comment | added | Servy | @HansPassant Unless it's also tagged with another, more popular, language tag, say because the question involved code from multiple languages. | |
Apr 16, 2018 at 21:50 | comment | added | Hans Passant | Any question about Python should be tagged [python]. That takes care of selecting the proper highlighting. | |
Apr 16, 2018 at 21:49 | history | edited | Servy |
edited tags
|
|
Apr 16, 2018 at 21:47 | comment | added | André Kool | Does this only apply to python or also other languages? If its only python maybe we can just get rid of that language :P | |
Apr 16, 2018 at 21:44 | history | edited | Richard | CC BY-SA 3.0 |
added 155 characters in body; edited tags
|
Apr 16, 2018 at 21:42 | history | edited | Makoto |
edited tags
|
|
Apr 16, 2018 at 21:42 | history | asked | Richard | CC BY-SA 3.0 |