I want to write short code in a 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 the code in backticks, the newlines are removed when rendered. How can I insert code into a 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...newline
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?[return]
key on any keyboard is much important than anyone except[space]
on your keyboard because this key is fundamental as space to bring a minimal level of readeability of any form of text.[return]
is not any form of advanced formatting. It is an elementary function to maintain readability of any text.