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
50
votes
8 answers

Syntax highlighting markdown code blocks in Jekyll (without using liquid tags)

It seems like syntax highlighting in Jekyll is limited to using liquid tags and pygments like so: {% highlight bash %} cd ~ {% endhighlight %} But I've imported my existing blog from wordpress and it was written in markdown (using markdown code…
markquezada
  • 8,444
  • 6
  • 45
  • 52
35
votes
5 answers

Table not render when use Redcarpet in Jekyll GitHub Pages?

As of maruku engine (the default), writing table like surround text, etc. | Tables | Are | Cool | | ------------- |:-------------:| -----:| | col 3 is | right-aligned | $1600 | | col 2 is | centered | $12 | |…
neizod
  • 1,582
  • 15
  • 24
19
votes
2 answers

How to render table with Redcarpet and Markdown

I'm trying to render a table like this with Redcarpet | header 1 | header 2 | | -------- | -------- | | cell 1 | cell 2 | | cell 3 | cell 4 | but it's not working. Is it possible to render a table with Redcarpet ?
jrabary
  • 2,411
  • 1
  • 28
  • 50
18
votes
1 answer

Underscore issues: Jekyll + redcarpet == Github flavored markdown?

I'm buliding a site with github pages and do not want underscores within words to italicize portions of those words. E.g. function_name_here should not render with name italicized. I understand github flavored markdown is supposed to be smart…
Bosh
  • 8,138
  • 11
  • 51
  • 77
10
votes
1 answer

How to Modify Redcarpet Markdown so it can handle classes?

I'm using Redcarpet Markdown on my Rails site. Often I'd like to add classes (or other attributes) to a paragraph, table or other element, but it doesn't allow it. If I replace the markdown element with HTML, then I need to replace the inside…
9
votes
1 answer

custom markdown in user input

I would like to add a simple markdown to user comments. When user submits this comment: I just got [card:Black Lotus] man. POW! I would like it to be display like this: I just got Black Lotus man. POW! but with extra html markup: I just got
Kocur4d
  • 6,701
  • 8
  • 35
  • 53
9
votes
4 answers

Markdown Line Breaks in Code Blocks

Using Redcarpet, when I include something like the following in my markdown, it does not respect any line breaks or indention. I've tried two spaces at the end of lines. Extra lines between code. Nothing seems to work. ```xml
Karl
  • 1,585
  • 2
  • 13
  • 22
8
votes
2 answers

Prevent HTML included in markdown file being processed further by Jekyll?

I'm working with Jekyll and want to use {% include... %} to include a snippet of HTML in a markdown file without that HTML being processed further, i.e. then being handled by the markdown processor as if it were just inline HMTL. Note: I'm using…
George Hawkins
  • 37,044
  • 7
  • 30
  • 43
8
votes
1 answer

Rails & Redcarpet: uninitialized constant Redcarpet::Render when used in ApplicationHelper

I'm following along the RailsCasts episode for Syntax Highlighting Revised. I updated my ApplicationHelper to look like so: require 'redcarpet' module ApplicationHelper class HTMLwithPygments < Redcarpet::Render::HTML def block_code(code,…
sunnyrjuneja
  • 6,033
  • 2
  • 32
  • 51
7
votes
2 answers

How can I convert github flavored markdown to HTML?

I know github has released the Redcarpet gem for converting markdown to HTML but as far as I have seen it doesn't support (or recognize) Github flavored markdown such as javascript var x = 1; Anyone know if there is a gem (or some way with…
codecraig
  • 3,118
  • 9
  • 48
  • 62
7
votes
0 answers

Using yard to work with markdown files

I've written some using documentation for a ruby gem. I'm using yard to generate the ruby gem reference documentation from the ruby source, and I want yard to work with this other markdown documentation. I've written the documentation within the…
SheffieldKevin
  • 271
  • 1
  • 13
7
votes
2 answers

How to extend redcarpet to support auto linking user mentions?

On my rails3 application I want to use redcarpet to handle user's posts and the user comment section. As such I'd like to extend redcarpet to support turning @username into a link to a user on my site. I know redcarpet is written in C but is there…
hadees
  • 1,754
  • 2
  • 25
  • 36
6
votes
1 answer

Redcarpet 2.0.1

I'm following this tutorial but it keeps failing saying "undefined method `new' for Redcarpet:Module". I have gem "redcarpet" in my Gemfile. The piece of code that is failing: Redcarpet.new(@post.content).to_html
unicorn_crack
  • 1,059
  • 1
  • 8
  • 19
6
votes
2 answers

Using ERB in Markdown with Redcarpet

I'm trying to get Markdown to play nicely with .erb. I'd like to use high_voltage to render markdown pages (or normal .html.erb files with markdown partials) that are parsed with Redcarpet and am struggling to get it to all work together. At the…
Rich
  • 590
  • 7
  • 20
6
votes
1 answer

Ruby/Redcarpet: strip markdown from text

I'm writing a Ruby app and it currently uses redcarpet to render Markdown. I need to strip Markdown markup from a text. Any easy way to do it?
sumek
  • 26,495
  • 13
  • 56
  • 75
1
2 3
9 10