mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: made SMF2 importer compatible with Ruby 2.0
This commit is contained in:
parent
91cbdb565d
commit
b74a7d271a
1 changed files with 2 additions and 1 deletions
|
@ -445,7 +445,8 @@ class ImportScripts::Smf2 < ImportScripts::Base
|
|||
# param1=value1=still1 value1 param2=value2 ...
|
||||
# => {'param1' => 'value1=still1 value1', 'param2' => 'value2 ...'}
|
||||
def parse_tag_params(params)
|
||||
params.to_s.strip.scan(/(?<param>\w+)=(?<value>(?:(?>\S+)|\s+(?!\w+=))*)/).to_h
|
||||
params.to_s.strip.scan(/(?<param>\w+)=(?<value>(?:(?>\S+)|\s+(?!\w+=))*)/).
|
||||
inject({}) {|h,e| h[e[0]] = e[1]; h }
|
||||
end
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Reference in a new issue