Skip to content

Commit

Permalink
Don't try to parse svg files. Fixes #350.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Mar 23, 2016
1 parent 1a0adc1 commit ae5c93e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.rdoc
Expand Up @@ -6,6 +6,7 @@
by Daniel Svensson.
* Parse rb_intern_const correctly in C. PR #381 by Sho Hashimoto.
* Fix broken assets caused by #335 when serving ri. PR #360 by Alex Wood.
* Don't try to parse svg files. Issue #350 by Sigurd Svela.

=== 4.2.2 / 2016-02-09

Expand Down
2 changes: 1 addition & 1 deletion lib/rdoc/rdoc.rb
Expand Up @@ -437,7 +437,7 @@ def parse_files files

def remove_unparseable files
files.reject do |file|
file =~ /\.(?:class|eps|erb|scpt\.txt|ttf|yml)$/i or
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
(file =~ /tags$/i and
open(file, 'rb') { |io|
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
Expand Down
1 change: 1 addition & 0 deletions test/test_rdoc_rdoc.rb
Expand Up @@ -300,6 +300,7 @@ def test_remove_unparseable
blah.eps
blah.erb
blah.scpt.txt
blah.svg
blah.ttf
blah.yml
]
Expand Down

0 comments on commit ae5c93e

Please sign in to comment.