Code cleanup
This commit is contained in:
parent
0f8e5c6fe1
commit
efa3d41ea6
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue