Timeline for Results of the October 2025 Community Asks Sprint: copy button for code blocks, and more
Current License: CC BY-SA 4.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 21 at 21:38 | comment | added | AJM | @GSerg The misdetected name is included in a manual copy with Ctrl-C. | |
| Nov 17 at 11:20 | comment | added | Sinatr | @CoarseRosinflower, it's not mandatory to speciy language when inserting code snippets. It would be A LOT of work to wix what they did everywhere. The language detection is working terribly wrong. The comments (really?) with attributions are: 1) useless 2) can be inserted as text, rather then "comments". The rookie (obviously) developer didn't even realise the complexity of the problem when he took his decision without consulting with senior. | |
| Nov 17 at 10:57 | comment | added | Kamil Maciorowski | @GSerg I wrote "if he or she manually copies the codeblock". My point is the name of the language (misdetected or not, irrelevant) looks like the very beginning of the code and if one chooses to select and copy the code manually then there is the risk he or she will copy the name along with the actual code provided by the author, not being aware the name was never meant to be inside the code. I gave the example where the name is a valid command and the described scenario may lead to very bad experience, not just to a syntax error. | |
| Nov 17 at 10:37 | comment | added | GSerg | @KamilMaciorowski Not sure what you are talking about. The misdetected name of the language is not included as the part of the copied code. | |
| Nov 15 at 21:22 | comment | added | Kamil Maciorowski | Codeblocks for Bash now include bash as their first line. So stupid. bash is a valid command, it starts a new shell. The misfeature breaks answers, especially those that say "put this in your .bashrc. Experienced users will spot the abomination, but a newbie might not. If he or she manually copies the codeblock and pastes into .bashrc as advised, this will create an infinite loop when Bash starts, not a nice situation. The detected code language shall not be glued to the code! | |
| Nov 14 at 18:03 | comment | added | Coarse Rosinflower | @Sinatr Remember, you can manually specify the language used in syntax highlighting. | |
| Nov 14 at 14:22 | comment | added | GSerg | @KRyan Not sure what to respond to there as that argument is complete nonsense which has been already pointed out in the following comments. "In order to optimize the experience for those who paste the code and press Compile without looking, with have mislabeled all code blocks on the site". a) Excellent choice of those for whom to optimize the experience, and b) It's not going to work even for them because, remember, they aren't looking. | |
| Nov 14 at 14:11 | comment | added | KRyan | +1, but you may want to respond to the rationale stated in this comment: “we wanted to display the detected code language so that users would know the attribution commenting format. If the language is wrongly detected, the commenting might be wrong and we didn't want to break anyone's code.” In cases where the guess is wrong, but the correct option exists, displaying the guess aids editors in finding and correcting the problem. | |
| Nov 13 at 8:48 | comment | added | GSerg | @JulesKerssemakers It's never going to have enough. The root cause is that the internal name of the highlighting rules package used by the syntax highlighter should not be presented as the name of the language. | |
| Nov 13 at 8:37 | comment | added | Jules Kerssemakers | so, the root cause is that the syntax highlighter needs more supported language tags? | |
| Nov 8 at 13:10 | comment | added | Gairfowl | Another example: shell languages. The bash syntax highlighting is close enough for other shells like zsh, csh, ksh, etc., but there are significant differences in the actual syntax. This question now has multiple blocks labelled bash, even though almost all of the code is specific to zsh. It's confusing. | |
| Nov 7 at 14:30 | comment | added | Sinatr | This. Please. Or rather remove the header! Detecting language is unreliable (my experience - xaml detected as php). Maybe showing language should be only done if language is specifed explicitly. Maybe you can have 2 small copy buttons to copy with attributions in comments (who ever needs or asks for this???) and copy ONLY code block? Then just don't show button if language is not specified? | |
| Nov 6 at 21:49 | comment | added | Robotnik | Alternatively: just remove the automation: let authors/editors set the displayed language manually | |
| S Nov 6 at 12:06 | history | answered | GSerg | CC BY-SA 4.0 | |
| S Nov 6 at 12:06 | history | made wiki | Post Made Community Wiki by GSerg |