Your comments

The only modification that I would make to the original suggestion is that the code should be collapsed to 3 lines by default with a 'See More' button to get the rest of the code snippet.