Skip to content

Instantly share code, notes, and snippets.

@kaityo256
Last active February 21, 2020 09:55
Show Gist options
  • Save kaityo256/e2a25ac49784cddd0808302d3c1e020f to your computer and use it in GitHub Desktop.
Save kaityo256/e2a25ac49784cddd0808302d3c1e020f to your computer and use it in GitHub Desktop.
A problem of Redcarpet
require 'redcarpet'
require 'redcarpet/render/review'
render = Redcarpet::Render::ReVIEW.new()
mk = Redcarpet::Markdown.new(render)
str1 = "$t_1$"
str2 = "$t_1$ to $t_2$"
puts "#{str1} is converted to "
puts mk.render(str1)
puts "#{str2} is converted to "
puts mk.render(str2)
@kaityo256
Copy link
Author

kaityo256 commented Feb 21, 2020

$ ruby test.rb
$t_1$ is converted to 


$t_1$

$t_1$ to $t_2$ is converted to 


$t@<b>{1$ to $t}2$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment