Skip to content

Commit

Permalink
lint a random file (#3907)
Browse files Browse the repository at this point in the history
  • Loading branch information
osc-bot authored Oct 28, 2024
1 parent a2f8ddc commit 66c1583
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions apps/dashboard/app/models/render_manifest_markdown.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'redcarpet'
# require './dashboard_router'

Expand All @@ -8,31 +10,31 @@ class RenderManifestMarkdown < Redcarpet::Render::HTML

def self.extensions
{
autolink: true,
tables: true,
strikethrough: true,
autolink: true,
tables: true,
strikethrough: true,
fenced_code_blocks: true,
no_intra_emphasis: true
no_intra_emphasis: true
}
end

def self.renderer
@markdown ||= Redcarpet::Markdown.new(self, self.extensions)
@markdown ||= Redcarpet::Markdown.new(self, extensions)
end

def self.renderer_for_disabled_apps
@markdown_disabled = Redcarpet::Markdown.new(self.new(no_links: true), self.extensions);
@markdown_disabled = Redcarpet::Markdown.new(new(no_links: true), extensions)
end

# override to customize the default renderer options
def initialize(opts={})
def initialize(opts = {})
super opts.merge(escape_html: true)

@no_links = opts.fetch(:no_links, false)
end

# open link in new window
def link(link, title, content)
def link(link, _title, content)
if no_links
content
else
Expand All @@ -49,4 +51,3 @@ def autolink(link_text, link_type)
end
end
end

0 comments on commit 66c1583

Please sign in to comment.