Commit 27c3a905 by Ivan Lan

feat: header[:format] 关键字冲突

parent 06908e25
...@@ -146,7 +146,7 @@ module TalltyImportExport ...@@ -146,7 +146,7 @@ module TalltyImportExport
val = header[:convert] ? send(header[:convert], v, h, info) : v val = header[:convert] ? send(header[:convert], v, h, info) : v
val.strip! if val.is_a?(String) val.strip! if val.is_a?(String)
val = handle_format(val, header, line_info) val = handle_attr_type(val, header, line_info)
if header[:json] if header[:json]
h[header[:json]] ||= {} h[header[:json]] ||= {}
...@@ -168,8 +168,8 @@ module TalltyImportExport ...@@ -168,8 +168,8 @@ module TalltyImportExport
end.with_indifferent_access end.with_indifferent_access
end end
def handle_format val, header, line_info def handle_attr_type val, header, line_info
case header[:format].to_s case header[:attr_type].to_s
when 'file' when 'file'
if val.is_a?(String) if val.is_a?(String)
val = val.split("\n").map do |url| val = val.split("\n").map do |url|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment