Questions tagged [redcarpet]

Redcarpet is a Ruby library for Markdown processing

Redcarpet is a Ruby library for Markdown processing, written by Vicent Martí. Check the code and docs on its Github page.

136 questions
2
votes
1 answer

Jekyll redcarpet render Table with frame

I had the same problem as in Table not render when use Redcarpet in Jekyll GitHub Pages? And I used the answer to get table rendering into my github Jekyll page. But it does not render the frame or lines of the table. Is there the possibility to get…
TM90
  • 680
  • 7
  • 21
2
votes
1 answer

Is the markdown syntax universal?

I've installed the Red Carpet gem and implemented it with my rails app. However, its readme doesn't really contain any information on the syntax. Should the syntax be obvious, then? All of the git hub markdown appears to be parsed successfully into…
Starkers
  • 10,273
  • 21
  • 95
  • 158
2
votes
1 answer

Is there any way to "precompile" Markdown in Rails?

I have a rails app which displays static markdown from an sqlite database. Is there any way to "precompile" the markdown files like for css/js so that markdown does not need to be re-rendered for each request? If so, how do I do it? There was a…
avinashbot
  • 1,177
  • 1
  • 11
  • 25
2
votes
1 answer

Liquid templating get tokens in a custom block

I am trying to build custom block using the Liquid Templating. Following is my code: module MyModule module Blocks class MyBlock < Liquid::Block def initialize(tag, markup, tokens) super @tag…
swaroopsm
  • 1,389
  • 4
  • 18
  • 34
2
votes
5 answers

Rendering sections of ERb templates in Markdown with Middleman

I'm using Middleman (and Ruby, and Rails) for the first time, and I've hit a bit of a roadblock when it comes to rendering individual pages using Redcarpet as my markdown processor, and ERb for layout. I want to use Markdown to style individual…
bigsweater
  • 498
  • 1
  • 6
  • 19
2
votes
2 answers

:footnotes extension won't work in Redcarpet Ruby gem

I must be missing something very obvious -- I can't get footnotes to work with redcarpet. I have version 3.0.0: > gem list redcarpet *** LOCAL GEMS *** redcarpet (3.0.0) I am trying code from the test code on the Github repo that has footnotes and…
sameers
  • 4,855
  • 3
  • 35
  • 44
2
votes
1 answer

Convert Jekyll posts with Redcarpet

I wrote a Jekyll generator that parses markdown and encodes the resulting HTML into JSON. The problem is, my code blocks are not being parsed. I think it’s because I’ve written my markdown with the Redcarpet style, but my generator doesn’t use…
Jezen Thomas
  • 13,619
  • 6
  • 53
  • 91
2
votes
0 answers

Code Syntax Highlighting with coderay

hey, i am using Coderay and Redcarpet for Syntax highlighting and parsing markup. Pls. suggest a way to get rid of the indicated leading spaces in the div (Ref Image) class CodeRayify < Redcarpet::Render::HTML def block_code(code, language) …
spidergears
  • 194
  • 11
2
votes
2 answers

Generate IDs in headings

My site uses Jekyll with Redcarpet markdown parser. I'd like to make it so my headings are automatically generated with ids: # My heading Becomes:

My heading

But I haven't found a way. I'd like to stick with redcarpet as…
Robin Winslow
  • 10,908
  • 8
  • 62
  • 91
2
votes
2 answers

Recommended setup for github jekyll on OS X that supports github flavored markdown

I've installed Jekyll-Bootstrap, the redcarpet plugin, and I've tried updating my Ruby to the latest RVM stable. I'm running OS X Mountain Lion (10.8.2). With this setup, if I insert a code block comment with either standard syntax (indent 4 spaces)…
Sean Parent
  • 693
  • 5
  • 10
2
votes
2 answers

Redcarpet & Middleman: :with_toc_data

I'm wondering about using Redcarpet's :with_toc_data option for Markdown working with Middleman (a Sinatra-based static site generator). Our current config.rb: set :markdown, :layout_engine => :haml set :markdown_engine, :redcarpet This doesn't…
1
vote
1 answer

How can I turn off certain tags for redcarpet in RoR?

I have the following function in application_helper.rb: def markdown(text) options = {} renderer = CustomRender.new(hard_wrap: true, filter_html: true) Redcarpet::Markdown.new(renderer, options).render(text).html_safe end I am using a…
blackhole
  • 137
  • 4
  • 15
1
vote
0 answers

Jekyll Rouge washed out Monokai color

I'm using Github Pages Jekyll static website generator with Cayman theme on Rouge Monokai syntax highlighting on my website. I used the instructions from this answer. I copied the scss from:…
WinEunuuchs2Unix
  • 1,801
  • 1
  • 17
  • 34
1
vote
0 answers

ruby on rails redcarpet code block not respecting indentation

I am trying to use recarpet in a rails 5 application, everything works fine except for the fact that indentations are not respected in code blocks. I setup redcarpet in my ApplicationHelper file as Shawn below. module ApplicationHelper def…
Andre Roy
  • 53
  • 7
1
vote
1 answer

Prevent Redcarpet from parsing a specific markdown feature

I use Redcarpet to parse and render markdown, though I require some specific changes from the default behaviour. For example, although I do need autolink, I need it to not link anything formatted like an email address. To achieve this, I use this…