mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
make rubocop happy
This commit is contained in:
parent
234f0262b8
commit
667b025d12
2 changed files with 7 additions and 7 deletions
|
@ -305,7 +305,7 @@ class ImportScripts::Bbpress < ImportScripts::Base
|
||||||
|
|
||||||
topics.each do |t|
|
topics.each do |t|
|
||||||
topic = topic_lookup_from_imported_post_id(t['id'])
|
topic = topic_lookup_from_imported_post_id(t['id'])
|
||||||
Permalink.create( url: URI.parse(t['guid']).path.chomp('/'), topic_id: topic[:topic_id] ) rescue nil
|
Permalink.create(url: URI.parse(t['guid']).path.chomp('/'), topic_id: topic[:topic_id]) rescue nil
|
||||||
end
|
end
|
||||||
last_topic_id = topics[-1]["id"].to_i
|
last_topic_id = topics[-1]["id"].to_i
|
||||||
end
|
end
|
||||||
|
|
|
@ -148,7 +148,7 @@ module ImportScripts::PhpBB3
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_code(text)
|
def process_code(text)
|
||||||
text.gsub!(/<span class="syntax.*?>(.*?)<\/span>/) {"#{$1}"}
|
text.gsub!(/<span class="syntax.*?>(.*?)<\/span>/) { "#{$1}" }
|
||||||
text.gsub!(/\[code(=[a-z]*)?\](.*?)\[\/code\]/i) { "[code]#{@he.decode($2)}[/code]" }
|
text.gsub!(/\[code(=[a-z]*)?\](.*?)\[\/code\]/i) { "[code]#{@he.decode($2)}[/code]" }
|
||||||
text.gsub!(/<br \/>/, "\n")
|
text.gsub!(/<br \/>/, "\n")
|
||||||
text
|
text
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue