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
6
votes
1 answer

Markdown live preview like stackoverflow for redcarpet on rails

I'm using Redcarpet as markdown tool and coderay for syntax highlighting in my rails app. What I want is a preview of what is being written in markdown format before posting it in database. A far better option is a live preview of what's being…
Shuvro
  • 1,499
  • 4
  • 14
  • 34
6
votes
1 answer

Why does Pygment.rb not highlight tags within
 properly -i.e. Google Prettify friendly tags?

I am calling it in my view like this: <%= markdown question.body %> This is what my ApplicationHelper looks like: module ApplicationHelper class HTMLwithPygments < Redcarpet::Render::HTML def block_code(code, language) …
marcamillion
  • 32,933
  • 55
  • 189
  • 380
5
votes
3 answers

Ruby: how to generate HTML from Markdown like GitHub's or BitBucket's?

On the main page of every repository in GitHub or BitBucket it shows the Readme.md in a very pretty format. Is there a way to make the same thing with ruby? I have already found some gems like Redcarpet, but it never looks pretty. I've followed this…
bonafernando
  • 1,048
  • 12
  • 14
5
votes
1 answer

Markdown not interpreted by Ruby redcarpet correctly

I have a following markdown for my slate project: --- title: API Reference language_tabs: - http - javascript search: true --- # Getting Started ## Logout # Call Management ## Call States ```javascript { } ``` ## Call Notification ## Caller ID…
Joy
  • 9,430
  • 11
  • 44
  • 95
5
votes
3 answers

Syntax highlighting in jekyll using redcarpet

I'm trying to get code highlighting to work for a simple blog built with jekyll. I want to be able to do code highlighting within posts written in markdown so I enabled redcarpet as markup language. This works all fine, the code gets formatted in…
Flavio
  • 1,507
  • 5
  • 17
  • 30
5
votes
1 answer

Markdown citations in octopress

I'm using markdown a lot and would like to have a few pages that mimic the behavior of wiki reference. For example: Blah blah blah {{Some Reference}} I'll be adding a lot of references throughout a few pages and am not sure how to…
ere
  • 1,739
  • 3
  • 19
  • 41
4
votes
3 answers

Github Markdown - rendering code blocks with XML & HTML - kramdown vs redcarpet

I'm running into some unusual errors in my git site. NOTE: I am using Kramdown + highlight.js to highlight code. Below is a lesson that I am working on. In this lesson, I need to render EML (similar to XML) in code blocks. I am using kramdown. I…
Leah Wasser
  • 717
  • 3
  • 8
  • 22
4
votes
3 answers

Jekyll, modify the way some html tags are rendered

I would like to modify the way some html tags are rendered on jekyll. What I need is to add some css classes automatically (in this case the ".table" class to the table html tag). I'm using the redcarpet markdown processor. I suppose I need to write…
cyrusza
  • 113
  • 11
4
votes
1 answer

How to embed a YouTube video in Markdown with Redcarpet for Rails?

I'm using Redcarpet's Markdown parser within Rails 4.1 so that staff can write messages to one another with some formatting. I want them to be able to embed youtube videos too. Maybe something like: Hey, *check out* my video:…
at.
  • 50,922
  • 104
  • 292
  • 461
4
votes
3 answers

Installing redcarpet gem on mavericks

I'm currently trying to install Redcarpet gem for a rails project. The problem is that a few days ago I upgraded to Mavericks OS and I'm not able to install it, but I'm not really sure if it has anything to do with the change of OS. Here's the…
Waclock
  • 1,686
  • 19
  • 37
4
votes
1 answer

Redcarpet Markdown gem: instantiating the Markdown object only once & reusing it between parses

I was reading through Redcarpet's documentation and came across this sentence: The Markdown object is encouraged to be instantiated once with the required settings, and reused between parses. What is the best way to go about doing this in a Rails…
Kurt Mueller
  • 3,173
  • 2
  • 29
  • 50
4
votes
1 answer

Rails 3 Gemfile Gems not Loading After Bundle Install

I'm writing an application in Rails 3 with Ruby v2.0.0. I have a helper in app/helpers/posts_helper.rb: module PostsHelper def markdown(text) @redcarpet = Redcarpet::Markdown.new(Redcarpet::Render::HTML, {fenced_code_blocks: true}) unless…
Mike Holler
  • 945
  • 2
  • 13
  • 28
4
votes
1 answer

How to configure Haml's :markdown filter to use Redcarpet with options?

I'm using Rails 3.2.11, Haml 4.0 and Redcarpet 2.2.2. I would like to configure Haml's :markdown filter to use Redcarpet with with_toc_data: true. In ApplicationHelper I tried defining: def markdown(text) markdown =…
silvenon
  • 2,068
  • 15
  • 29
4
votes
1 answer

Rendering raw html with Redcarpet and Markdown

I'm using Redcarpet as a Markdown renderer and I would like to be able to display html or any text with < and > without it to be parsed. Here is an illustration of what should happen: The user types I *want* to write The source of this…
nimser
  • 620
  • 2
  • 9
  • 22
3
votes
4 answers

Redcarpet/Bluecloth not allowing headers?

Is there a way to use either Redcarpet or Bluecloth such that when it interpolates the markdown it won't make any headers? For example: #header 1 yields: header 1 header 1 (preferred) And: ##header 2 yields: header 2 header 2 (preferred)
Cyrus
  • 3,687
  • 5
  • 35
  • 67
1
2
3
9 10