diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-13 12:17:07 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-03-14 15:29:00 -0600 |
commit | 6685cbeb99e58b6708aa338bf6d235c05695887b (patch) | |
tree | af5bf70e8e4ab7375b1a383d76c7bdaa2e1164fe | |
parent | 6890327762eaeca572ada783804a9c7af01e6144 (diff) | |
download | gitlab-ce-6685cbeb99e58b6708aa338bf6d235c05695887b.tar.gz |
Document tag option and clarify spec
-rw-r--r-- | lib/rouge/formatters/html_gitlab.rb | 7 | ||||
-rw-r--r-- | spec/features/copy_as_gfm_spec.rb | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index ec95ddf03ea..be0d97370d0 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -5,10 +5,9 @@ module Rouge # Creates a new <tt>Rouge::Formatter::HTMLGitlab</tt> instance. # - # [+linenostart+] The line number for the first line (default: 1). - def initialize(linenostart: 1, tag: nil) - @linenostart = linenostart - @line_number = linenostart + # [+tag+] The tag (language) of the lexer used to generate the formatted tokens + def initialize(tag: nil) + @line_number = 1 @tag = tag end diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb index f134d4be154..50030094765 100644 --- a/spec/features/copy_as_gfm_spec.rb +++ b/spec/features/copy_as_gfm_spec.rb @@ -543,7 +543,7 @@ describe 'Copy as GFM', feature: true, js: true do end context 'selecting multiple lines of text' do - it 'copies as a code block' do + it 'copies as a code block with the correct language' do verify( '.line[id="LC27"], .line[id="LC28"]', |