better bbcode parsing for phpbb bulk import script

This commit is contained in:
Arpit Jalan 2017-08-15 12:41:51 +05:30
parent 7e9b2289bd
commit 5ad94a7020
1 changed files with 2 additions and 2 deletions

View File

@ -399,8 +399,6 @@ class BulkImport::PhpBB < BulkImport::Base
text.gsub!(/:(?:\w{8})\]/, ']')
text = bbcode_to_md(text)
# Some links look like this: <!-- m --><a class="postlink" href="http://www.onegameamonth.com">http://www.onegameamonth.com</a><!-- m -->
text.gsub!(/<!-- \w --><a(?:.+)href="(\S+)"(?:.*)>(.+)<\/a><!-- \w -->/i, '[\2](\1)')
@ -434,6 +432,8 @@ class BulkImport::PhpBB < BulkImport::Base
end
end
text = bbcode_to_md(text)
text
end