For example, Markdown’s original implementation includes support for images and code blocks, but many users wanted either a different syntax and/or better extensibility of these features. Markdown’s original implementation was great in its day, but people eventually decided that they want more. Sweet! We can see that each framework (with the exception of Redcarpet) has a simple API for processing Markdown. Redcarpet::Markdown.new(Redcarpet::Render::HTML.new).render(markdown) In each implementation we can process this Markdown file in a single line of code. ![]() I’m looking at you, JRuby.įor our processing needs, we’ll use the Markdown from John Gruber’s Markdown syntax page saved to markup.md. ![]() This also means that, if your Ruby interpreter doesn’t support C extensions, you won’t be able to use RDiscount or Redcarpet. This may take a little bit of time because both RDiscount and Redcarpet use C extensions for faster processing speed. Obviously, we should install these gems first, so gem install kramdown maruku rdiscount redcarpet. We’re going to focus on 4 Ruby implementations of Markdown: kramdown, maruku, rdiscount, and redcarpet. ![]() Although its original implementation was written in Perl, Markdown has been ported into multiple languages with various features. Markdown is a fantastic markup language that compiles into HTML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |