Skip to content

Commit 0118bf7

Browse files
committed
fix: test fail standardrb
1 parent d9c8170 commit 0118bf7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/helpers/simple_discussion/forum_posts_helper.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'redcarpet'
1+
require "redcarpet"
22
class CustomRenderer < Redcarpet::Render::HTML
33
def initialize(circuit_embed: false, video_embed: false, user_tagging: false)
44
@circuit_embed = circuit_embed
@@ -9,15 +9,15 @@ def initialize(circuit_embed: false, video_embed: false, user_tagging: false)
99

1010
def image(url, title, alt_text)
1111
case alt_text
12-
when 'Circuit'
12+
when "Circuit"
1313
if @circuit_embed
1414
"<iframe width=\"540\" height=\"300\" src=\"#{url}\" frameborder=\"0\"></iframe><br>"
1515
else
1616
"<img src=\"#{url}\" alt=\"#{alt_text}\" title=\"#{title}\"><br>"
1717
end
18-
when 'Video'
18+
when "Video"
1919
if @video_embed
20-
video_id = url.split('v=')[1].split('&')[0]
20+
video_id = url.split("v=")[1].split("&")[0]
2121
"<iframe width=\"540\" height=\"300\" src=\"https://www.youtube.com/embed/#{video_id}\" frameborder=\"0\" allowfullscreen></iframe><br>"
2222
else
2323
"<img src=\"#{url}\" alt=\"#{alt_text}\" title=\"#{title}\"><br>"
@@ -29,11 +29,11 @@ def image(url, title, alt_text)
2929
end
3030

3131
def link(link, _title, content)
32-
if @user_tagging && link.start_with?('/users/')
32+
if @user_tagging && link.start_with?("/users/")
3333
uri = URI.parse(link)
3434
uri.path =~ %r{^/users/\d+/?$}
3535
# remove the brackets from the content
36-
content = content.gsub(/[()]/, '')
36+
content = content.gsub(/[()]/, "")
3737
"<a class='tag-user' target='_blank' href=\"#{link}\">#{content}</a>"
3838
else
3939
"<a href=\"#{link}\">#{content}</a>"

lib/simple_discussion/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Engine < ::Rails::Engine
1212

1313
initializer "simple_discussion.assets.precompile" do |app|
1414
app.config.assets.precompile += [
15-
"simple_discussion/application.js",
15+
"simple_discussion/application.js"
1616
]
1717
end
1818

0 commit comments

Comments
 (0)