discourse/onebox — pull request #233 by lidlanca (2014-09-16 05:31:42+00:00)
Title: 1.Fix: Github Incorrect line number on range. 2.Feature: show line number and control expanding

Fix
------------
line number range L5-L10 was returning the wrong lines, off by one.

Feature
--------------

When a one liner is provided "somefile.rb#L5" line expanding will apply
The number of lines before or after are configurable, and note that they will override the limit set by MAX_LINES
> LINES_BEFORE = 10
> LINES_AFTER = 10

Expanding behavior is controller via a bitwise flagging.
>EXPAND_ONE_LINER = EXPAND_AFTER|EXPAND_BEFORE

When **SHOW_LINE_NUMBER** flag is on and line range is provided in the URL,
line numbers will be added to the beginning of each line of code.

1: code line 1
2: code line 2
3: code line 3