Quantcast
Channel: Active questions tagged questions - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 597

How can I include new lines for code snippets inside comments?

$
0
0

I want to write short code in comment like:

function ngWrap($scope, fn) {    return function() {        var args = [].slice.call(arguments);        if (!$scope.$$phase) {            fn.apply(null, args);        } else {            return $scope.$apply(function() {                fn.apply(null, args);            });        }    };}

But when I put code in backticks, the newlines are removed when rendered. How can I insert code into comment, like on this answer?


Viewing all articles
Browse latest Browse all 597

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>