redcloth icon indicating copy to clipboard operation
redcloth copied to clipboard

Any way to only parse certain tags?

Open sean-yeoh opened this issue 3 years ago • 2 comments

Hi, is there any way to only parse certain tags, for example if I want to only parse bc..:

Given an input string: text = "h5. My Header\r\n\r\nbc.. Hello world\r\n\r\np. Bye world"

I want to get an output like: RedCloth.new(text).to_html #=> "h5. My Header\r\n\r\n<pre><code>Hello world</code></pre>\r\n\r\nBye world"

sean-yeoh avatar Sep 08 '21 09:09 sean-yeoh

Nor really

GregThoma avatar Jun 01 '24 11:06 GregThoma

p>The sun is reportedly hot,1 just like freshly baked potatoes.1 Ice is cold.2

  1. a b Ouch.
  2. a Brrr.
RedCloth 4.3.4

GregThoma avatar Jun 01 '24 11:06 GregThoma