Fix bug.
This commit is contained in:
parent
40d4b889fd
commit
ca4a48cb51
|
@ -308,7 +308,7 @@ class Cancerpredictfields
|
|||
js_code += "\n #{self.tmp_hidden_variables_for_js}"
|
||||
formula = text_to_math(self.prediction_formula)
|
||||
self.all_variables.each do |k|
|
||||
formula = formula.gsub(/#{k}?(-|\+|\*|\s|\=)/){ "result[\"#{k.strip}\"]#{$1}" }
|
||||
formula = formula.gsub(/(\A|[^\w])#{k}($|[^\w])/){|f| "#{$1}result[\"#{k.strip}\"]#{$2}" }
|
||||
end
|
||||
formula_variables = self.tmp_lpv_variables.map{|v| v}
|
||||
js_code = "\n function calculate_first_lpv(result_json){
|
||||
|
|
Loading…
Reference in New Issue