Skip to content

Commit

Permalink
allow same @<icon>s in one document (remove warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Apr 12, 2014
1 parent 78ecec5 commit 7305d5a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sat Apr 12 16:31:11 2014 Masayoshi Takahashi <takahashimm@gmail.com>

* lib/review/book/index.rb: allow same @<icon>s in one document (remove warning)

Thu Apr 3 19:03:03 2014 Kenshi Muto <kmuto@debian.org>

* change all .yaml to .yml. (#244)
Expand Down
17 changes: 17 additions & 0 deletions lib/review/book/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,23 @@ def find_pathes(id)
end

class IconIndex < ImageIndex
def initialize(items, chapid, basedir, types)
@items = items
@index = {}
items.each do |i|
## warn "warning: duplicate ID: #{i.id} (#{i})" unless @index[i.id].nil?
@index[i.id] = i
end
items.each do |i|
i.index = self
end
@chapid = chapid
@basedir = basedir
@types = types

@@entries ||= get_entries
end

def IconIndex.parse(src, *args)
items = []
seq = 1
Expand Down

0 comments on commit 7305d5a

Please sign in to comment.