Skip to content

Commit

Permalink
Fix some useage of pro
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Apr 21, 2015
1 parent dfa3caf commit c26ce04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/oddb2xml/parslet_compositions.rb
Expand Up @@ -288,7 +288,7 @@ class SubstanceParser < DoseParser
excipiens.as(:excipiens) |
farbstoff |
substance_ut |
(substance_more_info.maybe >> simple_substance >> corresp_substance.maybe >> space? >> dose_pro.maybe) >> str('pro dosi').maybe
substance_more_info.maybe >> simple_substance >> corresp_substance.maybe >> space? >> dose_pro.maybe >> str('pro dosi').maybe
# TODO: Fix this problem
# substance_with_digits_at_end_and_dose for unknown reasons adding this as last alternative disables parsing for simple stuff like 'glyceroli monostearas 40-55'
}
Expand Down Expand Up @@ -582,6 +582,7 @@ def SubstanceTransformer.excipiens
puts "#{File.basename(__FILE__)}:#{__LINE__}: dictionary #{dictionary}" if VERBOSE_MESSAGES
dose = dictionary[:dose_pro].is_a?(ParseDose) ? dictionary[:dose_pro] : ParseDose.new(dictionary[:dose_pro].to_s)
substance = ParseSubstance.new(dictionary[:substance_name], dose)
@@excipiens = dose
@@substances << substance
}

Expand Down

0 comments on commit c26ce04

Please sign in to comment.