Skip to content

-N, --[no-]line-numbers option doesn't seem to be working #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bartpiet opened this issue Feb 10, 2018 · 0 comments · Fixed by #630
Closed

-N, --[no-]line-numbers option doesn't seem to be working #597

bartpiet opened this issue Feb 10, 2018 · 0 comments · Fixed by #630

Comments

@bartpiet
Copy link

Running rdoc executable with --line-numbers option doesn't cause numbers of individual lines to be included in source code fragments.

rdoc --line-numbers ./lib/*.rb

Sample source fragment in generated HTML looks like this:

# File lib/nanorm/connection.rb, line 15
def execute(query)
  self.handler.query(query)
end

while it's reasonable to assume it should look like this:

   # File lib/nanorm/connection.rb
15 def execute(query)
16   self.handler.query(query)
17 end

No error message or warning is displayed in CLI. I'm using RDoc 6.0.1 on Ruby 2.5.0 (x86_64-linux). The second sample was in fact generated after editing generator/markup.rb in RDoc source and setting RDoc::MethodAttr.add_line_numbers variable to true. The feature is implemented and seems to be working fine, but for some reason it's inaccessible because the option is ignored.

Am I missing something? I looked for issues regarding this option, but haven't found any. Also, I checked with some earlier versions, 3.9.5 and 4.1.0 (on Ruby 1.9.3 and 2.1.10 respectively) behave the same way. RDoc V1.0.1 on Ruby 1.8.7 handles the option correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant