Skip to content

Commit ae5c93e

Browse files
author
Zachary Scott
committed
Don't try to parse svg files. Fixes #350.
1 parent 1a0adc1 commit ae5c93e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

History.rdoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
by Daniel Svensson.
77
* Parse rb_intern_const correctly in C. PR #381 by Sho Hashimoto.
88
* Fix broken assets caused by #335 when serving ri. PR #360 by Alex Wood.
9+
* Don't try to parse svg files. Issue #350 by Sigurd Svela.
910

1011
=== 4.2.2 / 2016-02-09
1112

lib/rdoc/rdoc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def parse_files files
437437

438438
def remove_unparseable files
439439
files.reject do |file|
440-
file =~ /\.(?:class|eps|erb|scpt\.txt|ttf|yml)$/i or
440+
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
441441
(file =~ /tags$/i and
442442
open(file, 'rb') { |io|
443443
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/

test/test_rdoc_rdoc.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ def test_remove_unparseable
300300
blah.eps
301301
blah.erb
302302
blah.scpt.txt
303+
blah.svg
303304
blah.ttf
304305
blah.yml
305306
]

0 commit comments

Comments
 (0)