v0.21.1 Convert Gossamer inline image syntax to \![url](url)
This commit is contained in:
parent
171159cba2
commit
c8677aaf0f
@ -1,5 +1,5 @@
|
|||||||
# gossamer threads migration-import code
|
# gossamer threads migration-import code
|
||||||
# v0.21
|
# v0.21.1
|
||||||
|
|
||||||
require 'mysql2'
|
require 'mysql2'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
@ -687,8 +687,8 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# Remove unsupported tags
|
# Remove unsupported tags
|
||||||
sanitized_message.gsub!(/\[.*?\]/, '')
|
sanitized_message.gsub!(/\[.*?\]/, '')
|
||||||
|
|
||||||
# Convert inline image syntax from `!(url)` to `![image](url)`
|
# Convert inline image syntax from `!(url)` to `![url](url)`
|
||||||
sanitized_message.gsub!(/!\((http[s]?:\/\/[^\)]+)\)/, '![image](\1)')
|
sanitized_message.gsub!(/!\((http[s]?:\/\/[^\)]+)\)/, '![\1](\1)')
|
||||||
|
|
||||||
sanitized_message
|
sanitized_message
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user