From c8677aaf0fb79dd7fcfdd27ac5e4cca9a4339257 Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 29 Jun 2024 00:30:16 +1000 Subject: [PATCH] v0.21.1 Convert Gossamer inline image syntax to \![url](url) --- gossamer_forums.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index f0b857f..6b8fed4 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,5 +1,5 @@ # gossamer threads migration-import code -# v0.21 +# v0.21.1 require 'mysql2' require 'open-uri' @@ -687,8 +687,8 @@ class GossamerForumsImporter < ImportScripts::Base # Remove unsupported tags sanitized_message.gsub!(/\[.*?\]/, '') - # Convert inline image syntax from `!(url)` to `![image](url)` - sanitized_message.gsub!(/!\((http[s]?:\/\/[^\)]+)\)/, '![image](\1)') + # Convert inline image syntax from `!(url)` to `![url](url)` + sanitized_message.gsub!(/!\((http[s]?:\/\/[^\)]+)\)/, '![\1](\1)') sanitized_message end