fix error

This commit is contained in:
chiu committed 2021-02-23 16:53:40 +08:00
1 parent 0cf33d44ae
commit 438f7ce792
1 file changed
+1 -1
+1 -1
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+}/)