forked from saurabh/personal-journal
Fix author text bug.
This commit is contained in:
parent
64d837d5ca
commit
958c5c835b
|
@ -10,7 +10,7 @@ module Admin::JournalPapersHelper
|
|||
end
|
||||
full_authors_names = get_member(journal).collect do |member|
|
||||
member_name = member.name
|
||||
idx = authors_names.index{|a| a.chomp('*') == member_name}
|
||||
idx = authors_names.index{|a| a.match(/(^|[ \(\[])#{member_name}([ \)\]\*]|$)/)}
|
||||
if idx
|
||||
member_name = authors_names[idx]
|
||||
authors_names[idx] = nil
|
||||
|
@ -31,7 +31,7 @@ module Admin::JournalPapersHelper
|
|||
end
|
||||
full_authors = get_member(journal).collect do |member|
|
||||
member_name = member.name
|
||||
idx = authors_names.index{|a| a.chomp('*') == member_name}
|
||||
idx = authors_names.index{|a| a.match(/(^|[ \(\[])#{member_name}([ \)\]\*]|$)/)}
|
||||
if idx
|
||||
member_name = authors_names[idx]
|
||||
authors_names[idx] = nil
|
||||
|
|
Loading…
Reference in New Issue