We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is markdown underline: underlined
This is ==highlighted==
This is a "quote"
def method user.destroy end
\int_{a}^{b} x^2 \,dx
# frozen_string_literal: true module R::MarkdownHelper def self.markdown(text) return "" unless text options = { escape_html: true } renderer = R::Markdown::ChapterRenderer.new(options) markdown = Redcarpet::Markdown.new(renderer, default_markdown_extensions) markdown.render(text).html_safe end def self.excerpt(md, truncate_at = 400, truncate_options = {}) truncate_options.reverse_update({ separator: /\s/ }) markdown = Redcarpet::Markdown.new(R::Markdown::ExcerptRenderer, default_markdown_extensions) markdown.render(md).truncate(truncate_at, truncate_options) end def self.plain_markdown(text) return "" unless text extensions = { no_intra_emphasis: true, autolink: true, superscript: false, disable_indented_code_blocks: true, fenced_code_blocks: false, strikethrough: true, lax_spacing: true } options = { filter_html: true, no_images: true } renderer = Redcarpet::Render::HTML.new(options) markdown = Redcarpet::Markdown.new(renderer, extensions) markdown.render(text).html_safe end def self.plain_markdown_with_newlines(text) return "" unless text extensions = { no_intra_emphasis: true, autolink: true, superscript: false, disable_indented_code_blocks: true, fenced_code_blocks: false, strikethrough: true, lax_spacing: true } options = { filter_html: true, hard_wrap: true, no_images: true } renderer = Redcarpet::Render::HTML.new(options) markdown = Redcarpet::Markdown.new(renderer, extensions) markdown.render(text).html_safe end private def self.default_markdown_extensions { autolink: true, disable_indented_code_blocks: true, fenced_code_blocks: true, lax_spacing: true, no_intra_emphasis: true, strikethrough: true, superscript: true, tables: true, underline: true, highlight: true, quote: true } end end
The text was updated successfully, but these errors were encountered:
linking with target blank:
Klik hier Klik hier{:target="_blank"} Klik hier
Sorry, something went wrong.
No branches or pull requests
This is markdown underline: underlined
This is ==highlighted==
This is a "quote"
The text was updated successfully, but these errors were encountered: