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

Wrong number of arguments (0 for 1) using Redcarpet Gem

I'm trying to use the Redcarpet gem to render markdown on my app and am getting the error wrong number of arguments (0 for 1) on my erb page where I call the render:

<%= markdown.render(@wiki.body) %>

Here's my application_helper: module…
Liz
  • 1,369
  • 2
  • 26
  • 61
0
votes
2 answers

Render images into my post content

I'm trying to add images to my post which I thought that would be easier but god I've been struggling for a while now. I tried to use Redcarpet and added some ruby Image_tag code but didn't work. Also I tried with tag and the raw method but no…
Ezequiel Ramiro
  • 760
  • 1
  • 12
  • 29
0
votes
2 answers

Rails asset css.erb is not loading

I'm configuring Markdown in Rails 4 with Redcarpet and Rouge. And I'm following this simple post Everything is working fine (both in development and production) except that my file assets/stylesheets/rouge.css.erb seems not to be loading. And it…
Seybo Glaux
  • 787
  • 1
  • 7
  • 16
0
votes
1 answer

Convert markdown to html with a table of contents using Redcarpet

My goal is to convert a markdown document to html, with a table of contents at the top. I saw that Redcarpet has a HTML_TOC option, which is really nice. But when I use it, it only renders the TOC, it does not include the rest of the…
wisbucky
  • 33,218
  • 10
  • 150
  • 101
0
votes
1 answer

How to get rid of additional spaces using redcarpet gem (Ruby on Rails)

I'm trying to write blog using markdown, and decided to install redcarpet gem. Everything looks fine, pygments.rb are doing great job with syntax highlighting, BUT the problem is, whenever I try to put block of code using ``` I get all lines (except…
weezing
  • 396
  • 1
  • 8
  • 22
0
votes
1 answer

Rails is inserting element in the wrong position on HTML-Output. Wrong Syntax?

this is probably quite simple, but I tried solving it now for a longer time. I have a helper method picture(file, alt) and a customized image-tag for the Markdown converter RedCarpet. The helper method creates a -tag with a given file and…
R4ttlesnake
  • 1,661
  • 3
  • 18
  • 28
0
votes
0 answers

Installing red carpet -v '3.3.3'

I currently have Redcarpet 3.1.2, using OS X El Capitan 10.11.2 I am trying to run 'bundle exec jekyll serve' but it seems that I had to run a bundle install. This is where the install errors-out Installing redcarpet 3.3.3 (was 3.3.2) with native…
0
votes
1 answer

Combining truncate with Redcarpet markdown in Rails: Links don't work

I'm using Redcarpet for syntax highlighting in my Rails blog application. In my posts/index.html.erb, I want to truncate the blog posts in order to preview the first few sentences (or paragraph). The user should be able to click on "read more" at…
OhDaeSu
  • 515
  • 1
  • 7
  • 21
0
votes
1 answer

Fenced code in Middleman via Redcarpet not working correctly

So I've been working on my own blog/site utilizing middleman and I've run into a bit of a snag with the fenced code via redcarpet. No matter what I do I seem to run into the same issue repeatedly. Well pictures are worth a thousand words you can see…
Dipet
  • 323
  • 3
  • 14
0
votes
0 answers

Jekyll and pygments using nasm

I'm trying to get my nasm syntax highlighted in Jekyll using pygments. It works flawlessly for C and Python, but nasm doesn't seem to work. ```nasm section .text global _start _start: xor ecx, ecx mov al,15 ; changed push…
Lucas Kauffman
  • 6,789
  • 15
  • 60
  • 86
0
votes
0 answers

Jekyll adding extra BR elements after line break in markdown

Jekyll is adding an extra
element after line breaks in my .md file, within blocks intended to be paragraphs. I notice this seems to happen mostly when I break the line after a period (.) . Line breaks anywhere else don't have this issue. …
wrschneider
  • 17,913
  • 16
  • 96
  • 176
0
votes
1 answer

Redcarpet Markdown Conversion Method, NoMethodError

Working on an assignment here. Was just introduced to Redcarpet and the Markdown conversion Method. This was placed inside my Helper: def markdown_to_html(markdown) renderer = Redcarpet::Render::HTML.new extensions = { fenced_code_blocks: true…
Jonathan Musso
  • 1,374
  • 3
  • 21
  • 45
0
votes
2 answers

CodeRay style messed up - how to fix

I'm trying to use CodeRay in my project and it seems to be working, however the style and formatting seems to be messed: Note that I'm using CodeRay in conjunction with Markdown (Redcarpet). I've added both gems in my gemfile and in the…
WagnerMatosUK
  • 4,309
  • 7
  • 56
  • 95
0
votes
1 answer

Don't escape tag in Markdown code block

I've got the following Markdown code that gets parsed and displayed in HTML (the Markdown is being converted to HTML using RedCarpet): curl https://api.example.com \ -u ":" And I want the
FloatingRock
  • 6,741
  • 6
  • 42
  • 75
0
votes
1 answer

How to mark search phrase in syntax highlighted markdown code?

In my rails blog app, I may author the post body markdown (I am using redcarpet for markdown parsing with CodeRay for syntax highlighting). I have a search page, which returns posts containing the search query string. I use the rails helper to…
Anand
  • 3,690
  • 4
  • 33
  • 64