Tuesday, September 17, 2013

Highlighting Lines of Code in Github

Ever needed to share some code with somebody and point them to the lines of interest?

Here's how to do that if the code is in github:

Summary

Just add
#L[STARTING_LINE_NO]-[ENDING_LINE_NO]
to the end of the original url.

Example


https://github.com/angular/angular.js/blob/master/test/ApiSpecs.js#L6-16

No comments:

Post a Comment