mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
Fix typo in regex [SCI-1849]
This commit is contained in:
parent
c933030b94
commit
60e3a836be
1 changed files with 2 additions and 2 deletions
|
@ -202,7 +202,7 @@ class TeamImporter
|
|||
updated = false
|
||||
%w(prj exp tsk sam).each do |name|
|
||||
text.scan(/~#{name}~\w+\]/).each do |text_match|
|
||||
orig_id_encoded = text_match.match(/~#{name}~(\w)+\]/)[1]
|
||||
orig_id_encoded = text_match.match(/~#{name}~(\w+)\]/)[1]
|
||||
orig_id = orig_id_encoded.base62_decode
|
||||
new_id_encoded =
|
||||
case name
|
||||
|
@ -220,7 +220,7 @@ class TeamImporter
|
|||
end
|
||||
end
|
||||
text.scan(/\[@[\w+-@?! ]+~\w+\]/).each do |user_match|
|
||||
orig_id_encoded = user_match.match(/\[@[\w+-@?! ]+~(\w)+\]/)[1]
|
||||
orig_id_encoded = user_match.match(/\[@[\w+-@?! ]+~(\w+)\]/)[1]
|
||||
orig_id = orig_id_encoded.base62_decode
|
||||
new_id_encoded = @user_mappings[orig_id].base62_encode
|
||||
text.sub!("~#{orig_id_encoded}]", "~#{new_id_encoded}]")
|
||||
|
|
Loading…
Reference in a new issue