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
0 answers

How can I use fenced_code_blocks in redcarpet to render the output in block?

I use redcarpet and kramdown trying to render the output in a block. It outputs the following result with HTML tags in the UI instead of rendering the output in a block. How can I use redcarpet and kramdown to render the output in an actual…
langlearn
  • 1
  • 2
0
votes
0 answers

How to render images from Markdown files with Rails 5.2?

I based my applications inline help on Markdown files, implemented with Redcarpet gem. Contextual help is displayed as expected, but embedded images are not. The help files structure in the project is: public/help/administration/Connection …
user1185081
  • 1,898
  • 2
  • 21
  • 46
0
votes
1 answer

Ruby, How to prevent Redcarpet to render HTML code in the output?

I am using Redcarpet to render in a webpage data introduced by the User. I see that it is very easy for the User to introduce malicious HTML code. I am trying different Redcarpet initializer options to prevent any possible malicious code to be…
fguillen
  • 36,125
  • 23
  • 149
  • 210
0
votes
1 answer

parse_markdown and truncate

I have to use at the same time parse_markdown and truncate. My text is (for example) "Hi **boys**, I am very happy to be here with you. I am so proud of you and your work." If I use <%=…
J.Luca
  • 208
  • 1
  • 10
0
votes
1 answer

Can anyone explain me how does :hard_wrap work?

I don't undestand how to create a new line using Markdown Redcarpet. I type Line 1 Line 2 But I see Line 1 Line 2 In my helper I have markdown = Redcarpet::Markdown.new(MarkdownRenderer, hard_wrap: true, autolink: true, space_after_headers: true)
J.Luca
  • 208
  • 1
  • 10
0
votes
0 answers

why doesn't text display in jekyll site generator?

I want to launch a site using jekyll, but the problem is that no posts are displayed. I have used the template lanyon. The odd thing is that with the command bundle exec jekyll serve The website starts without any problems, but no posts are still…
Hadii Varposhti
  • 416
  • 4
  • 22
0
votes
1 answer

New line error for Redcarpet gem

I have a #markdown method in my ApplicationHelper that I wanted write a simple unit test: def markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML) markdown.render(text).html_safe # tried wihout html_safe too end Whenever I…
ogirginc
  • 4,948
  • 3
  • 31
  • 45
0
votes
1 answer

How can I use RedCarpet without CodeRay to implement markdown in my blogs?

So I have patiently tried for some time to work with CodeRay gem to implement markdown in my blogs. It worked for awhile, but then it would break my blog page with a 500 error. The CodeRay.scan was identified as the culprit: class CodeRayify <…
user8359832
0
votes
1 answer

Redcarpet gem appends parsed markdown outside of the enclosing span

In my Rails app, I have a textarea box that I want people to be able to use markdown on. The redcarpet gem works fine for purposes of rendering the markdown, but it appends it after the enclosing span. This screws up my design; the top of the…
globewalldesk
  • 544
  • 1
  • 3
  • 18
0
votes
2 answers

Markdown rendered with Redcarpet missing dashes for lists and new lines between sections

I have some markdown that I generated which looks like this in text form: "### We're looking for someone with…\r\n\r\n- Significant Rails experience\r\n- Good communication skills (recommended)\r\n\r\n\r\n### You should be located…
Zack Shapiro
  • 6,648
  • 17
  • 83
  • 151
0
votes
0 answers

Redcarpet markdown removes my own CSS in Rails

I'm trying to implement Redcarpet Markdown in my Rails project. I have a class 'camp-description' which styles the paragraph. My problem is that when I add the markdown() inside my ERB tag then the styles of camp-description is not applied…
Andy
  • 531
  • 1
  • 4
  • 19
0
votes
1 answer

Redcarpet markdown ignoring multiple line breaks

I have user-entered markdown text stored in a database that I need to render with a custom Redcarpet renderer (for Prawn PDF generation). For single line breaks (i.e. "\r\n"), the renderer correctly processes the break. However, when the text…
roy
  • 65
  • 4
0
votes
2 answers

Application_helper and ruby gem Redcarpet error

I am trying to get the markdown up and running on my webapp using pygment 0.6.3 and redcarpet 3.3. Unfortunately, I am facing a wall here when calling the markdown method: uninitialized constant ApplicationHelper::Redcarpet Here is the module I…
Boris SB
  • 43
  • 1
  • 10
0
votes
1 answer

Redcarpet Footnotes extension not working

I am trying to get linked footnotes to work but somehow Redcarpet simply is not recognizing the footnote extension I am passing into the initialiser. I am running Redcarpet version 3.3.4, which should have the footnotes functionality merged into…
danielbker
  • 392
  • 1
  • 3
  • 21
0
votes
0 answers

Redcarpet, render html with links inside and not

I'm using the redcarpet gem to render html from markdown. The following markdown (link)[example.com] renders this html

link

How can I make it render html like this
prajwaldp
  • 178
  • 1
  • 14