lib/MESH/tree.rb in mesh-medical-subject-headings-2.1.0 vs lib/MESH/tree.rb in mesh-medical-subject-headings-2.2.0
- old
+ new
@@ -65,12 +65,18 @@
current_heading.entries << mh unless current_heading.entries.include? mh
librarian_parts = mh.match(/(.*), (.*)/)
nln = librarian_parts.nil? ? mh : "#{librarian_parts[2]} #{librarian_parts[1]}"
current_heading.set_natural_language_name(nln)
- when matches = line.match(/^(?:PRINT )?ENTRY = ([^|]+)/)
- entry = matches[1].chomp
- current_heading.entries << entry unless current_heading.entries.include? entry
+ # when matches = line.match(/^(?:PRINT )?ENTRY = ([^|]+)/)
+ # entry = matches[1].chomp
+ # current_heading.entries << entry unless current_heading.entries.include? entry
+ #
+ when matches = line.match(/^(?:PRINT )?ENTRY = (.*)/)
+ entry = matches[1]
+ term = entry.match(/([^|]+)/)
+ current_heading.entries << term[1] unless current_heading.entries.include? term[1]
+ current_heading.structured_entries << MESH::Entry.new(current_heading, entry)
end
end
\ No newline at end of file