rubychan / coderay

Fast and easy syntax highlighting for selected languages, written in Ruby.
http://coderay.rubychan.de/
Other
846 stars 115 forks source link

One serious bug ... (coderay overwrite the file) #175

Open zw963 opened 10 years ago

zw963 commented 10 years ago
$ coderay 1.rb 2.rb
I don't know the Encoder ""ruby"".

and 2.rb will be overwrite with 0 bytes.

korny commented 10 years ago

It's intended behavior. coderay -h should show you the correct CLI syntax.

I agree that the syntax is a bit unfortunate, but it doesn't really make sense to call a syntax highlighter with two input files, right?

zw963 commented 10 years ago

Hi, thanks for you reply.

I know this argument is what means. (After this disaster happen ...) But, I think two file name is useful. although what I do some like strange... I integrate coderay with cat command. so error has occured.

Anyway, it is easy to forget this, so I submit this issue. I think it can be better, e.g. format parse with -f format or --format=format.