fix error

This commit is contained in:
chiu 2021-02-23 16:53:40 +08:00
parent 0cf33d44ae
commit 438f7ce792
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ class Admin::AsksController < OrbitAdminController
redirect_to "/#{locale}/admin/asks/category_setting"
end
def process_format_text(text,custom_fields)
customs = text.scan(/<tr.*{custom}.*<\/tr>/m).uniq
customs = text.scan(/<tr(?:(?!<tr).)+\{custom\}(?:(?!<tr).)+<\/tr>/m).uniq
if customs.length != 0
custom_exist_nums = []
custom_exists = text.scan(/{custom\d+}/)