From efa3d41ea6c8ad36129697ed18cc89c362d42981 Mon Sep 17 00:00:00 2001 From: Muhsin Date: Fri, 23 Dec 2022 16:34:06 +0530 Subject: [PATCH] Code cleanup --- app/models/concerns/liquidable.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/models/concerns/liquidable.rb b/app/models/concerns/liquidable.rb index 6c5735591..0ef1594d1 100644 --- a/app/models/concerns/liquidable.rb +++ b/app/models/concerns/liquidable.rb @@ -28,15 +28,9 @@ module Liquidable self.content = template.render(message_drops) end - # def get_liquid_content - # content.gsub(/{{([^}]*)}}/) do |_match| - # "{{#{$1} | default: ''}}" - # end - # end - def modified_liquid_content # This regex is used to match the code blocks in the content # We don't want to process liquid in code blocks - content.gsub(/```(.*?)```/m, '{% raw %}```\\1```{% endraw %}') + content.gsub(/`(.*?)`/m, '{% raw %}`\\1`{% endraw %}') end end