From 82585681eb7e2cb1aa6abd949104972871bba29f Mon Sep 17 00:00:00 2001 From: BoHung Chiu Date: Thu, 27 Jul 2023 16:41:27 +0800 Subject: [PATCH] Fix bug. --- app/controllers/admin/personal_plugin_fields_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/personal_plugin_fields_controller.rb b/app/controllers/admin/personal_plugin_fields_controller.rb index 4f557ea..6ff92dc 100644 --- a/app/controllers/admin/personal_plugin_fields_controller.rb +++ b/app/controllers/admin/personal_plugin_fields_controller.rb @@ -798,7 +798,7 @@ class Admin::PersonalPluginFieldsController < OrbitMemberController match_count = parse_content.match(/^ *\* *\d+/m) match_count = match_count ? match_count[0] : nil has_exist_condition = parse_content.split("\n")[0].match(/if[ ]+\w+/).present? - exist_condition = parse_content.split("\n")[0].match(/if[ ]+#{::Regexp.escape(k)}(?=\.| |$)/) + exist_condition = parse_content.split("\n")[0].match(/if[ ]+#{::Regexp.escape(k)}(?=\.| |$|\r)/) if has_exist_condition && exist_condition.nil? #if this block is for other variables, then not proccessing @parse_again_mode = false result