25

When editing a question with a pastebin.com link without accompanying code (e.g. How do I create tileable solid noise?), a warning is displayed saying that the link needs to be accompanied by code:

Links to pastebin.com must be accompanied by code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.

pastebin.com warning

This warning suggests using indentation to create code blocks.

However, it appears to be the case that code fences are becoming the preferred means of creating code blocks.

Unlike the old syntax highlighter, the new CommonMark syntax highlighting doesn't support language tags in indented code blocks — only in code fences:

If you want to declare the language for syntax highlighting in your code block, use the code-fence notation and not indented code blocks. You can still use indented code blocks, but declaring the preferred language explicitly for them is no longer supported moving forward.

Secondly, while the editor still uses the indentation approach when clicking on the "Code Sample" button, the formatting tip for code blocks when creating a new question now uses code fences (except in the example within a list):

code block formatting tip when creating an answer

Inconsistently, the formatting tip for code blocks when creating an answer or editing an answer or question mentions both approaches:

code block formatting tip when creating a question or editing

Should the pastebin.com warning message be changed to suggest using code fences instead of indented code blocks?

1
  • If I'm not mistaken, a new editor is in the works anyway, which I assume will default to the new code-fence syntax and address this.
    – zcoop98
    Dec 21, 2020 at 21:49

0

You must log in to answer this question.