Finish taking the multiple issues which Discourse had with the very large number of posts in this particular topic

This commit is contained in:
David Sainty 2024-12-09 20:20:52 +11:00
parent 553f70cdef
commit 8787035865

View File

@ -1060,7 +1060,9 @@ class GossamerForumsImporter < ImportScripts::Base
# sanitized_message.gsub!(/!\[(?:http|https):\/\/data:image\/[^]]+\]\((?:http|https):\/\/data:image\/[^)]+\)/, '')
# sanitized_message.gsub!(/!\[(https?:\/\/data:image\/[^]]+)\]\((https?:\/\/data:image\/[^)]+)\)/, '')
# sanitized_message.gsub!(/!\[(https?:\/\/data:image\/[^\]]+)\]\((https?:\/\/data:image\/[^\)]+)\)/)
puts "Here 111 #{sanitized_message}"
sanitized_message.gsub!(/!\[https?:\/\/data:image[^\]]*\]\(https?:\/\/data:image[^\)]*\)/, '')
puts "Here 222 #{sanitized_message}"
# Ensure sentence structure