File tree Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 1
- === 3.10 / ??
1
+ === 3.11 / 2011/10-17
2
+
3
+ * Bug fixes
4
+ * Avoid parsing TAGS files included in gems. Issue #81 by Santiago
5
+ Pastorino.
6
+
7
+ === 3.10 / 2011-10-08
2
8
3
9
* Major enhancements
4
10
* RDoc HTML output has been improved:
Original file line number Diff line number Diff line change @@ -30,3 +30,7 @@ API changes to RDoc
30
30
* Rename Context to Container
31
31
* Rename NormalClass to Class
32
32
33
+ === Crazy Ideas
34
+
35
+ * Auto-normalize heading levels to look OK. It's weird to see an <h1> in
36
+ the middle of a method section.
Original file line number Diff line number Diff line change @@ -402,11 +402,16 @@ def parse_files files
402
402
end
403
403
404
404
##
405
- # Removes file extensions known to be unparseable from +files+
405
+ # Removes file extensions known to be unparseable from +files+ and TAGS
406
+ # files for emacs and vim.
406
407
407
408
def remove_unparseable files
408
409
files . reject do |file |
409
- file =~ /\. (?:class|eps|erb|scpt\. txt|ttf|yml)$/i
410
+ file =~ /\. (?:class|eps|erb|scpt\. txt|ttf|yml)$/i or
411
+ ( file =~ /tags$/i and
412
+ open ( file , 'rb' ) { |io |
413
+ io . read ( 100 ) =~ /\A (\f \n [^,]+,\d +$|!_TAG_)/
414
+ } )
410
415
end
411
416
end
412
417
Original file line number Diff line number Diff line change @@ -122,6 +122,34 @@ def test_remove_unparseable
122
122
assert_empty @rdoc . remove_unparseable file_list
123
123
end
124
124
125
+ def test_remove_unparseable_tags_emacs
126
+ temp_dir do
127
+ open 'TAGS' , 'w' do |io | # emacs
128
+ io . write "\f \n lib/foo.rb,43\n "
129
+ end
130
+
131
+ file_list = %w[
132
+ TAGS
133
+ ]
134
+
135
+ assert_empty @rdoc . remove_unparseable file_list
136
+ end
137
+ end
138
+
139
+ def test_remove_unparseable_tags_vim
140
+ temp_dir do
141
+ open 'TAGS' , 'w' do |io | # emacs
142
+ io . write "!_TAG_"
143
+ end
144
+
145
+ file_list = %w[
146
+ TAGS
147
+ ]
148
+
149
+ assert_empty @rdoc . remove_unparseable file_list
150
+ end
151
+ end
152
+
125
153
def test_setup_output_dir
126
154
Dir . mktmpdir { |d |
127
155
path = File . join d , 'testdir'
You can’t perform that action at this time.
0 commit comments