mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 08:17:53 +08:00
better bbcode parsing for phpbb bulk import script
This commit is contained in:
parent
7e9b2289bd
commit
5ad94a7020
@ -399,8 +399,6 @@ class BulkImport::PhpBB < BulkImport::Base
|
|||||||
|
|
||||||
text.gsub!(/:(?:\w{8})\]/, ']')
|
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 -->
|
# 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)')
|
text.gsub!(/<!-- \w --><a(?:.+)href="(\S+)"(?:.*)>(.+)<\/a><!-- \w -->/i, '[\2](\1)')
|
||||||
|
|
||||||
@ -434,6 +432,8 @@ class BulkImport::PhpBB < BulkImport::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
text = bbcode_to_md(text)
|
||||||
|
|
||||||
text
|
text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user