14

I've noticed recently a new (citation needed) "trend" where some users are putting their code blocks/fences inside quote blocks as well. These code blocks aren't, however, quoting anything; there is no citation or reference to an external site (apart from on some a link to a fiddle of some kind).

In the past I have removed the quote block markdown from the post, but more than often I find that such edits are reverted by the author. I have even asked in the past what the original source is of the quoted text, to either get no reply or tell me it's the fiddle, which if so, should provide further evidence of attribution depending on the site. Certainly if they are quoting someone else's work (fiddle) then they should be stating the work is not theirs.

Is removing the quote blocks actually correct here? Should code blocks/fences with no evidence of original source and/or author ok, or is it just a styling thing some people like to use? if the latter, then is formatting the post to do so, which implies a quoted source, correct when there is no quoted source?

As an example, you might see a answer that looks like the below (overly simplified example):

You can use a SELECT with a parameter to achieve this:

SELECT C.ID,
       C.CustomerName,
       C.DoB
FROM dbo.Customer C
WHERE C.DoB >= DATEADD(YEAR, -@YearsOld,GETDATE());
37 row(s) affected

db<>fiddle

I did find this question when researching, which looked promising, but seems to be more when you should use quote blocks/code blocks for errors, more than is putting code in quote blocks, when it isn't citing anything, good use of the formatting. If my Google-Fu has missed the canonical duplicate, please do point me in the right direction.

3
  • 4
    It is another way of decorating posts (overformatting) that some users insist on. If it is new posts one could wait a few weeks before removing it. Commented Apr 8, 2022 at 1:21
  • In your post's example I see 2 quote blocks and a code block. Clearly one of the quote blocks is extraneous but it's unclear which you take issue with. Is it the entire quoted "answer" or the quoted code snippets? Perhaps an example edit result would be helpful here.
    – Drew Reese
    Commented Apr 8, 2022 at 23:05
  • Here is an example with all the normal text quoted. Commented Apr 9, 2022 at 1:15

1 Answer 1

22

Of course one should remove improper formatting when found.

If a block of code is not a quote, quote formatting shouldn't be used.

Blockquote formatting is reserved for things copied from somewhere else, and should not be used for emphasis or decoration. If you find it misused, remove it.

1
  • 3
    Comments are not for extended discussion; a tangential conversation has been moved to chat.
    – Cody Gray Mod
    Commented Apr 6, 2022 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .