Questions tagged [rdiscount]

RDiscount is the Ruby binding to Discount, a fast Markdown to HTML processor with many syntax extensions.

More information can be found on the RDiscount project page.

31 questions
101
votes
5 answers

Are numbered headings in Markdown / Rdiscount possible?

I'm trying to produce html with section / subsection headings resembling the following: My top-level topic 1.1 My first subtopic 1.2 Another subtopic       1.2.1 A sub-subtopic Another top-level topic Are there any implementations of Markdown…
sterling938
  • 1,015
  • 2
  • 7
  • 7
11
votes
1 answer

How can I use rdiscount on Heroku?

I am trying to push a small test app to Heroku. Here is the App and the Gem file: App: require 'sinatra' require 'haml' require 'rdiscount' set :markdown, :layout_engine => :haml, :layout => :layout get '/' do haml :index end get '/blog' do …
tobias.henn
  • 225
  • 2
  • 13
5
votes
1 answer

Using RDiscount, where should I do the actual formatting?

I'm using RDiscount but my Ruby on Rails skills are limited. RDiscount has its .to_html function which converts the Markdown text into HTML. So here's the scenario: <% @posts.each do |post| %>

<%= post.title %>

<%= post.content…
Emil Ahlbäck
  • 6,085
  • 8
  • 39
  • 54
4
votes
1 answer

haml with markdown claims rdiscount not found

I've specified gem 'haml' gem 'rdiscount' in my Gemfile and ran bundle install The relevant code is .welcome-message :markdown Welcome **#{current_user.email}** When I access the page I get Can't run Markdown filter; required …
Vadim
  • 17,897
  • 4
  • 38
  • 62
4
votes
4 answers

generate nofollow links in RDiscount output

My rails app is using RDiscount to generate HTML from user-supplied markdown text, and I noticed that the anchor tags don't have rel="nofollow". This is a big issue for me as my app is open to the public. Is there a way to enable nofollow links,…
widgetycrank
  • 429
  • 4
  • 11
4
votes
1 answer

Syntax highlighting with CodeRay and Markdown (RDiscount) in a Rails 3 application

I'm trying to add some syntax highlighting to my blog that currently uses RDiscount. I am converting the Markdown to HTML with RDiscount then parsing the HTML code blocks with CodeRay to add syntax highlighting. This is what I have so far: class…
Andrew
  • 227,796
  • 193
  • 515
  • 708
4
votes
1 answer

Octopress blank page when add backtick code block

I am wondering why I am getting blank page when I add backtick code block with specific language? _config.yml markdown: rdiscount rdiscount: extensions: - autolink - footnotes - smart pygments: false # default python pygments have…
Phonbopit
  • 3,393
  • 3
  • 21
  • 29
3
votes
2 answers

Missing Dependency: rdiscount

I am trying to build a site using jekyll, I have install jekyll and as the next requirement I have also done sudo gem install rdiscount Successfully installed rdiscount-2.1.7 Parsing documentation for rdiscount-2.1.7 Done installing documentation…
add-semi-colons
  • 18,094
  • 55
  • 145
  • 232
3
votes
2 answers

Installation Issues with ruby and gem rdiscount windows 8 64bit

I am attempting to get Jekyll and bower working within Windows 8 I have managed to install Ruby, and the DevKit, I tried, version 2.0.2, 1.9.3 and then again with the Rails installer from http://railsinstaller.org/ I have followed both scenario A…
Sean
  • 95
  • 1
  • 8
2
votes
3 answers

An error occurred while installing rdiscount (2.2.0.1) and Bundler cannot continue on Mac OS and Ruby 2.7.1

Problem: I have tried to do a gem install rdiscount -v '2.2.0.1' and get an error. Solution: I have tried below command to get this to work gem install rdiscount:2.2.0.1 -- --with-cflags="-Wno-error=implicit-function-declaration" Error looks…
2
votes
1 answer

RDiscount: Allow only certain tags

Is it possible to limit the set of allowed "tags" when using RDiscount? Let's say I want to prevent the user from creating lists e.g.? Or only allow bold and italic tags? And if not, can this be done using e.g. BlueCloth or some other…
polarblau
  • 17,649
  • 7
  • 63
  • 84
2
votes
1 answer

On Ruby on Rails, how to do Syntax highlighting using Markdown (RDiscount / BlueCloth) with CodeRay?

I am aware there is a Railscast and ASCIIcast for using Textile (RedCloth) with CodeRay, and the way it is done is by a helper: module ApplicationHelper def coderay(text) text.gsub(/\(.+?)\<\/code\>/m) do …
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
2
votes
1 answer

rdiscount + haml in Rails 3 problem

Ok, I hope this is a simple typo or something, but I've got a problem trying to get HAML to print markdown text. The relevant portion of my gemfile looks like this: gem 'rdiscount' My text looks like this: ### TEST HEADING ### Here's some text. My…
Andrew
  • 42,517
  • 51
  • 181
  • 281
2
votes
2 answers

Jekyll - rdiscount is missing but it is installed

My Jekyll site stopped generating itself. When I start Jekyll, I get a missing dependency error for rdiscount: ~/src/markcerqueira.github.com [source] jekyll serve --watch WARN: Unresolved specs during Gem::Specification.reset: pygments.rb…
Mark
  • 7,306
  • 8
  • 45
  • 87
2
votes
1 answer

image_tag in markdown with paperclip

I'm adding images in the text of my blog articles. I have the BlogImage model: class BlogImage < ActiveRecord::Base attr_accessible :blog_id, :caption, :image belongs_to :blog has_attached_file :image, styles: { big: "1200X630>", medium:…
Don Giulio
  • 2,946
  • 3
  • 43
  • 82
1
2 3