Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 1
    I want to see exact list of what has changed.
    – Sinatr
    Commented Jun 2, 2020 at 8:33
  • 7
    1. Language hints will not be converted to code fences. For a while our renderer will understand the old language hint syntax. This is going to change in the future so don't rely on it and start using code fences instead. 2. No notifications, no review queue for now. 3. I'd let the migration do the heavy lifting. No harm in correcting posts ahead of time but also no need to do that.
    – Ham Vocke
    Commented Jun 2, 2020 at 8:57
  • @HamVocke Language hints are processed by the migration, though, right? This is just about the transition period with the CMark renderer for new content and edits, yes? Commented Jun 2, 2020 at 13:23
  • 5
    Yes, strictly speaking processing language hints is living outside of the renderer itself so they will be picked up still for a while. However, we'd like to take this as an opportunity to deprecate a hand-rolled solution that's been superseded by an official one and encourage everyone to move away from using old-fashioned language hints for new content because we'll get rid of them eventually.
    – Ham Vocke
    Commented Jun 2, 2020 at 15:34
  • 3
    @HamVocke does it mean that some long-forgotten posts using this feature will break after this "a while", when the renderer understands these comments, ends?
    – Ruslan
    Commented Jun 3, 2020 at 18:27
  • 3
    @Ruslan old posts are going to be just fine as we render the HTML of a post once and then serve that until someone changes a post again. Once language hints become unsupported, editing old posts that still use them means that you'd have to switch over to the new syntax.
    – Ham Vocke
    Commented Jun 3, 2020 at 18:37
  • 1
    "Language hints will not be converted to code fences." @HamVocke why not? Generally I've gone with the auto-detected language; if I override it, it's for a good reason.
    – miken32
    Commented Jun 5, 2020 at 17:08
  • 2
    @miken32 because it's tricky to get right. It's again a matter of trade-offs: How many users are using that feature vs. how long would it take to build an automated conversion vs. how big is the risk of introducing side-effects. And then there's the question whether everyone would be okay if we change their indented code blocks to fenced code blocks. To me risk and effort clearly outweighed the benefits.
    – Ham Vocke
    Commented Jun 6, 2020 at 10:19
  • 1
    @HamVocke "Language hints will not be converted to code fences" -- please reconsider that decision. As I understand it, that would mean that all code which has been highlighted using the old language hints will (a) cease to be highlighted unless manually edited subsequently to add the new syntax; and (b) such manual edits will be changing every single line, which is (i) arduous, (ii) error-prone, and (iii) creates a diff for every single line of the code, making it ever harder to notice errors. To me, this is a clear case for automated translation.
    – phils
    Commented Jun 15, 2020 at 22:06
  • Further to the point about diffs -- I regularly edit other people's questions and answers to add language hints to existing code. If they used indented code, I would add the SGML comment hints; if they used triple backticks, I would use that. Either way, the edit diff I created was minimal, so everyone reviewing the edit could see at a glance that it was trivially correct. The proposed change will mean that no one can add language hints to indented code blocks without changing every line of the code, which requires far more effort to do in the first place, and far more effort to review.
    – phils
    Commented Jun 15, 2020 at 22:13
  • 3
    Not automatically migrating the indented code will likely ensure that few people will ever bother improving indented code by adding (or correcting) the syntax highlighting; and when they do make such improvements, it requires more effort from not only the person performing the edit, but from everyone who checks it.
    – phils
    Commented Jun 15, 2020 at 22:18