Skip to content

Line numbers #30

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
jlebrech opened this issue Jul 27, 2012 · 4 comments
Closed

Line numbers #30

jlebrech opened this issue Jul 27, 2012 · 4 comments

Comments

@jlebrech
Copy link

can you add an option to output the lines number along with the syntax highlighted code?

@korny
Copy link
Member

korny commented Jul 27, 2012

There already is :line_numbers: http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html

@jlebrech
Copy link
Author

Is this available as a command line option?

@korny
Copy link
Member

korny commented Jul 27, 2012

Not yet. If you use the HTML encoder:

coderay file.rb -html

it outputs a whole HTML page with line numbers in a table.

Do you want to output into the terminal? This encoder does not have such an option. UNIX to the rescue:

coderay file.rb | nl

Works great for me :-)

@nathany
Copy link
Contributor

nathany commented Oct 28, 2012

This could be improved with #51 - Improved command line interface.

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

No branches or pull requests

3 participants