# Is it okay to convert a question code block into a working snippet?

We tend to leave the source code alone as all aspects are valid for code review. But, questions like these are just asking to be converted to a snippet ( there's a link to JsFiddle even!)

Just wanted to know your input on this.

• I've been adding them to questions, while leaving existing code alone, so I'm also interested in hearing what everyone has to say. Sep 29 '14 at 18:10

I would find a good thing to transform code block into Stack Snippet. If all the working code to make a working snippet is available, we would only be missing on a good feature.

If there is a JsFiddle link, I would not remove it, since it can provide others features that are fun to use (JSHint is the first one I'm thinking).

If there is not enough code in the question and you need to copy code from a JsFiddle, I would refrain from doing so. We should be cautious about the code in a question.

I will share what I have been doing when I see questions like this.

If OP has posted all of the relevant code (HTML, CSS, & JS), I will convert the question into a Stack Snippet. If you do this, please be careful not to run the Tidy tool, as indentation and formatting is a topic for review and would be an invalid edit.

If OP has not posted all of the relevant code, but has supplied a link to a JSFiddle, I will use the JSFiddle to add a Stack Snippet using the hide attribute to hide the snippet. This leaves the originally posted code as the focus of the review, but also allows us to include the snippet. As Marc-Andre pointed out, JSFiddle has some useful functionality that Stack Snippets don't, so it's best to leave the external link alone.

Markdown to hide a snippet:

<!-- begin snippet: js hide: true -- >

• I don't know how I feel about adding code. Since we post things under some license, I wonder if it conflicts with jsfiddle licensing without the consent of the OP. If there is no licensing problem I would not oppose to the hiding thing. Sep 29 '14 at 18:53
• That's a good point @Marc-Andre. JSFiddle has a different licensing scheme. "All code belongs to the poster and no license is enforced." doc.jsfiddle.net/meta/credits.html#license Sep 29 '14 at 19:26