-
Notifications
You must be signed in to change notification settings - Fork 440
Closed
Description
If you use a magic comment, the line numbers are wrong as they treat the first non-magic comment line as line 1. This probably needs fixing in lib/rdoc/encoding.rb
.
Example:
$ cat a.rb && rdoc24 a.rb > /dev/null 2>&1 && fgrep line doc/Object.html
def a; end
<pre><span class="ruby-comment"># File a.rb, line 1</span>
$ cat a2.rb && rdoc24 a2.rb > /dev/null 2>&1 && fgrep line doc/Object.html
# encoding: utf-8
def a; end
<pre><span class="ruby-comment"># File a2.rb, line 1</span>
$ cat a3.rb && rdoc24 a3.rb > /dev/null 2>&1 && fgrep line doc/Object.html
# encoding: utf-8
# frozen-string-literal: true
def a; end
<pre><span class="ruby-comment"># File a3.rb, line 1</span>
$ cat a4.rb && rdoc24 a4.rb > /dev/null 2>&1 && fgrep line doc/Object.html
# encoding: utf-8
# frozen-string-literal: true
def a; end
<pre><span class="ruby-comment"># File a4.rb, line 2</span>
Metadata
Metadata
Assignees
Labels
No labels