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
1
vote
1 answer

Jekyll removing / in paths

I am trying to create a complex table in Jekyll and rather than use the Redcarpet table syntax I am just using plain old HTML. The table contains images which, when rendered on the page, look fine, but when I build the site either Jekyll or…
1
vote
1 answer

Set Default Language on Pygments.rb | Redcarpet

I'm trying to set a fix language for Pygments.rb, Javascript. I'm using Redcarpet for the Markdown. So far i'm here: # Model.rb before_save :render_source def render_source require 'redcarpet' renderer = PygmentizeHTMLSOURCE extensions =…
1
vote
1 answer

Code syntax highlighting in my Rails 4.0.4 app using Redcarpet & Pygments.rb?

The objective I am trying to render markdown documentation with snippets of code in it, and I'd like to highlight the syntax like on Github or BitBucket. My Environment Rails 4.0.4 Ruby 2.1.1 In my gemfile gem 'haml-rails' gem 'redcarpet' #…
zabumba
  • 12,172
  • 16
  • 72
  • 129
1
vote
3 answers

Rails - Use Redcarpet as Markdown interpreter, how can I make all links have a html targer _blank attribute?

I use Redcarpet as my backend Markdown interpreter solution. I want all links to have a html target attribute and its value equal to '_blank', but I can't find any solution for it. Could any one help me? Thanks.
user3087000
  • 731
  • 1
  • 13
  • 24
1
vote
1 answer

How to migrate HAML helper to HAML 4?

Hi I'm using HAML to render my blog articles and I decided to migrate to new Ruby version, new Rails version and new HAML version. The problem is that it seems something changed and I can't identify what's wrong with my code. Could someone explain…
Fantattitude
  • 1,842
  • 2
  • 18
  • 34
1
vote
2 answers

redcarpet-2.2.2 doesn't come the content

Ruby: 2.0.0p0 , Rails: 3.2.13,redcarpet: 2.2.2 application_helper.rb def markdown(text) markdown_render = Redcarpet::Render::HTML.new(:hard_wrap =>…
zjhui
  • 779
  • 1
  • 8
  • 21
1
vote
1 answer

Stop conversion of content between pre tags in Jekyll

Running a small site off Jekyll. One problem that I keep running into is that the markdown keeps modifying content that is between pre tags. Two conspicuous examples. First:
a & b
gets converted to
a &
Second…
1
vote
1 answer

Redcarpet anchors to headers

I'm using Redcarpet gem for markdown and i wanna to generate automatic anchors for h2 titles to allow linking to each section. show.html.erb
<%= markdown(@post.body) %>
application_helper.rb class HTMLwithPygments <…
user1625602
  • 63
  • 1
  • 6
1
vote
1 answer

jekyll does not want to work with redcarpet

I've installed jekyll and would like to use redcarpet. My jekyll does not come with this ability from the basic install - so I've tried to install it as a plugin: https://github.com/nono/Jekyll-plugins It's still not working. Does anyone know how…
Jeremy Iglehart
  • 4,281
  • 5
  • 25
  • 38
1
vote
0 answers

Assertion failed md - Jekyll

I noticed recently that my Jekyll site is completely blank. When I run the jekyll server locally it starts up fine, but when I change a file, it fails. The only thing out of the ordinary I recall doing is using Redcarpet. ~/code/ryanjm[temp*]%…
RyanJM
  • 7,028
  • 8
  • 60
  • 90
1
vote
0 answers

Using Redcarpet with LiveReload

From what I've been reading about Markdown filters, I'd like to use RedCarpet as my filter in HAML. However, I'm using LiveReload , and apparently, currently it supports only RDiscount, RPeg-markdown, Maruku and BlueCloth. Can anyone tell me how to…
user137369
  • 5,219
  • 5
  • 31
  • 54
1
vote
2 answers

simple formatting/parsing in markdown for blockquotes

I'm using markdown in my site and I would like to do some simple parsing for news articles. How can I parse markdown to pull all blockquotes and links, so I can highlight them separately from the rest of the document For example I would like to…
ere
  • 1,739
  • 3
  • 19
  • 41
1
vote
2 answers

Sinatra render and passing rendering options for Redcarpet

I’m using Sinatra, and Sinatra uses Tilt for template rendering. By default Redcarpet has many rendering extensions. How can I use some of these extensions via Sinatra’s #render method? I need to render markdown files with :gh_codeblock extension.
vorobey
  • 4,401
  • 3
  • 18
  • 20
0
votes
1 answer

Assign metadata to blockquotes in markdown

I need to associate markdown blockquotes with certain meta information (author/source, date, and link). That information is then included in data attributes, and CSS displays a footer using the information in those attributes:
Dennis Hackethal
  • 13,662
  • 12
  • 66
  • 115
0
votes
2 answers

redcarpet gem renderer that makes links out of `[[` blocks

I'm trying to use redcarpet to make a custom renderer that transforms [[id]] blocks into links to other pages in my app. Documentation of custom renderers is rather concise, so I'm not sure how to use this. here's what I got so far (which doesn't…
Don Giulio
  • 2,946
  • 3
  • 43
  • 82