What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

It should be pretty straight forward to add the following code snippets to the allowed HTML subset, or some additional markup that would effectively do the same thing.

<script src="https://gist.github.com/839992.js?file=Switch.java"></script>

so that the above would display the nice formatted, line numbered, code folded display that GitHub provides inline as a code block.

share|improve this question
2  
I think this would be great for a few more reasons: - people are already posting links to github (this would allow more control and would show when it is well used)- allow sourcing of the raw code directly (no more copy pasting) - when the code gets updated (for example to allow compatibility to upgrades) the question get updated automaticly - you could probably still have a line limit -the solution may spread through the net faster - you could maybe get github to have a specific stack overflow tag/gist type -... –  Etienne Low-Décarie May 9 '12 at 19:25

1 Answer 1

This already happens in chat (paste it as a single link on a single message), but I don't think we need to support it here for two reasons

  1. The relevant bits of code should be in the post for context, otherwise the question / answer is incomplete.

  2. If you need to say "and there's 50kb more code to look at here", then a link suffices for that purpose.

share|improve this answer
2  
Couldn't line limits still be imposed to the gist script? How to deal with frequent required update of answers du to changes in related structure, data, script...? –  Etienne Low-Décarie May 9 '12 at 19:36

You must log in to answer this question.

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