mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-06 07:33:04 +08:00
Fix bug with TinyMCE not working for steps with nil description
Closes SCI-1321.
This commit is contained in:
parent
a9bd86352d
commit
8c7aebbb88
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ module TinyMceHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_image_tag_from_token(text)
|
def generate_image_tag_from_token(text)
|
||||||
|
return nil if text.nil?
|
||||||
regex = /\[~tiny_mce_id:([0-9a-zA-Z]+)\]/
|
regex = /\[~tiny_mce_id:([0-9a-zA-Z]+)\]/
|
||||||
text.gsub(regex) do |el|
|
text.gsub(regex) do |el|
|
||||||
match = el.match(regex)
|
match = el.match(regex)
|
||||||
|
|
Loading…
Reference in a new issue