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?
Perl/C,
but is a big issue with languages that rely on formatting, likePython,
to say nothing when you want to include a few lines of a stack-dump... – boardrider Aug 11 '15 at 12:19newline
Look at the[return]
key on your keyboard. You will notice that it is larger than punctuation characters keys, and than any alphabetic character key. Do you guess why? – dan Nov 13 '20 at 12:18