redcarpet-3.4.0/ 0000755 0001750 0001750 00000000000 13120765126 013620 5 ustar abhijith abhijith redcarpet-3.4.0/metadata.yml 0000644 0001750 0001750 00000007104 13120765126 016125 0 ustar abhijith abhijith --- !ruby/object:Gem::Specification name: redcarpet version: !ruby/object:Gem::Version version: 3.4.0 platform: ruby authors: - Natacha Porté - Vicent Martí autorequire: bindir: bin cert_chain: [] date: 2016-12-25 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '10.5' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '10.5' - !ruby/object:Gem::Dependency name: rake-compiler requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: 0.9.5 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: 0.9.5 - !ruby/object:Gem::Dependency name: test-unit requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: 3.1.3 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: 3.1.3 description: A fast, safe and extensible Markdown to (X)HTML parser email: vicent@github.com executables: - redcarpet extensions: - ext/redcarpet/extconf.rb extra_rdoc_files: - COPYING files: - COPYING - Gemfile - README.markdown - Rakefile - bin/redcarpet - ext/redcarpet/autolink.c - ext/redcarpet/autolink.h - ext/redcarpet/buffer.c - ext/redcarpet/buffer.h - ext/redcarpet/extconf.rb - ext/redcarpet/houdini.h - ext/redcarpet/houdini_href_e.c - ext/redcarpet/houdini_html_e.c - ext/redcarpet/html.c - ext/redcarpet/html.h - ext/redcarpet/html_blocks.h - ext/redcarpet/html_smartypants.c - ext/redcarpet/markdown.c - ext/redcarpet/markdown.h - ext/redcarpet/rc_markdown.c - ext/redcarpet/rc_render.c - ext/redcarpet/redcarpet.h - ext/redcarpet/stack.c - ext/redcarpet/stack.h - lib/redcarpet.rb - lib/redcarpet/cli.rb - lib/redcarpet/compat.rb - lib/redcarpet/render_man.rb - lib/redcarpet/render_strip.rb - redcarpet.gemspec - test/benchmark.rb - test/custom_render_test.rb - test/fixtures/benchmark.md - test/html5_test.rb - test/html_render_test.rb - test/html_toc_render_test.rb - test/markdown_test.rb - test/pathological_inputs_test.rb - test/redcarpet_bin_test.rb - test/redcarpet_compat_test.rb - test/safe_render_test.rb - test/smarty_html_test.rb - test/smarty_pants_test.rb - test/stripdown_render_test.rb - test/test_helper.rb homepage: http://github.com/vmg/redcarpet licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: 1.9.2 required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.5.2 signing_key: specification_version: 4 summary: Markdown that smells nice test_files: - test/benchmark.rb - test/custom_render_test.rb - test/fixtures/benchmark.md - test/html5_test.rb - test/html_render_test.rb - test/html_toc_render_test.rb - test/markdown_test.rb - test/pathological_inputs_test.rb - test/redcarpet_bin_test.rb - test/redcarpet_compat_test.rb - test/safe_render_test.rb - test/smarty_html_test.rb - test/smarty_pants_test.rb - test/stripdown_render_test.rb - test/test_helper.rb redcarpet-3.4.0/COPYING 0000644 0001750 0001750 00000002104 13120765126 014650 0 ustar abhijith abhijith Copyright (c) 2009, Natacha Porté Copyright (c) 2015, Vicent Marti Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. redcarpet-3.4.0/README.markdown 0000644 0001750 0001750 00000033416 13120765126 016330 0 ustar abhijith abhijith Redcarpet is written with sugar, spice and everything nice ============================================================ [](https://travis-ci.org/vmg/redcarpet) [](https://www.versioneye.com/ruby/redcarpet) Redcarpet is a Ruby library for Markdown processing that smells like butterflies and popcorn. This library is written by people --------------------------------- Redcarpet was written by [Vicent Martí](https://github.com/vmg). It is maintained by [Robin Dupret](https://github.com/robin850) and [Matt Rogers](https://github.com/mattr-). Redcarpet would not be possible without the [Sundown](https://www.github.com/vmg/sundown) library and its authors (Natacha Porté, Vicent Martí, and its many awesome contributors). You can totally install it as a Gem ----------------------------------- Redcarpet is readily available as a Ruby gem. It will build some native extensions, but the parser is standalone and requires no installed libraries. Starting with Redcarpet 3.0, the minimum required Ruby version is 1.9.2 (or Rubinius in 1.9 mode). $ [sudo] gem install redcarpet If you need to use it with Ruby 1.8.7, you will have to stick with 2.3.0: $ [sudo] gem install redcarpet -v 2.3.0 The Redcarpet source is available at GitHub: $ git clone git://github.com/vmg/redcarpet.git And it's like *really* simple to use ------------------------------------ The core of the Redcarpet library is the `Redcarpet::Markdown` class. Each instance of the class is attached to a `Renderer` object; the Markdown class performs parsing of a document and uses the attached renderer to generate output. The `Redcarpet::Markdown` object is encouraged to be instantiated once with the required settings, and reused between parses. ~~~~~ ruby # Initializes a Markdown parser markdown = Redcarpet::Markdown.new(renderer, extensions = {}) ~~~~~ Here, the `renderer` variable refers to a renderer object, inheriting from `Redcarpet::Render::Base`. If the given object has not been instantiated, the library will do it with default arguments. Rendering with the `Markdown` object is done through `Markdown#render`. Unlike in the RedCloth API, the text to render is passed as an argument and not stored inside the `Markdown` instance, to encourage reusability. Example: ~~~~~ ruby markdown.render("This is *bongos*, indeed.") # => "
This is bongos, indeed.
" ~~~~~ You can also specify a hash containing the Markdown extensions which the parser will identify. The following extensions are accepted: * `:no_intra_emphasis`: do not parse emphasis inside of words. Strings such as `foo_bar_baz` will not generate `` tags. * `:tables`: parse tables, PHP-Markdown style. * `:fenced_code_blocks`: parse fenced code blocks, PHP-Markdown style. Blocks delimited with 3 or more `~` or backticks will be considered as code, without the need to be indented. An optional language name may be added at the end of the opening fence for the code block. * `:autolink`: parse links even when they are not enclosed in `<>` characters. Autolinks for the http, https and ftp protocols will be automatically detected. Email addresses and http links without protocol, but starting with `www` are also handled. * `:disable_indented_code_blocks`: do not parse usual markdown code blocks. Markdown converts text with four spaces at the front of each line to code blocks. This option prevents it from doing so. Recommended to use with `fenced_code_blocks: true`. * `:strikethrough`: parse strikethrough, PHP-Markdown style. Two `~` characters mark the start of a strikethrough, e.g. `this is ~~good~~ bad`. * `:lax_spacing`: HTML blocks do not require to be surrounded by an empty line as in the Markdown standard. * `:space_after_headers`: A space is always required between the hash at the beginning of a header and its name, e.g. `#this is my header` would not be a valid header. * `:superscript`: parse superscripts after the `^` character; contiguous superscripts are nested together, and complex values can be enclosed in parenthesis, e.g. `this is the 2^(nd) time`. * `:underline`: parse underscored emphasis as underlines. `This is _underlined_ but this is still *italic*`. * `:highlight`: parse highlights. `This is ==highlighted==`. It looks like this: `highlighted` * `:quote`: parse quotes. `This is a "quote"`. It looks like this: `quote` * `:footnotes`: parse footnotes, PHP-Markdown style. A footnote works very much like a reference-style link: it consists of a marker next to the text (e.g. `This is a sentence.[^1]`) and a footnote definition on its own line anywhere within the document (e.g. `[^1]: This is a footnote.`). Example: ~~~ruby markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) ~~~~~ Darling, I packed you a couple renderers for lunch -------------------------------------------------- Redcarpet comes with two built-in renderers, `Redcarpet::Render::HTML` and `Redcarpet::Render::XHTML`, which output HTML and XHTML, respectively. These renderers are actually implemented in C and hence offer brilliant performance — several degrees of magnitude faster than other Ruby Markdown solutions. All the rendering flags that previously applied only to HTML output have now been moved to the `Redcarpet::Render::HTML` class, and may be enabled when instantiating the renderer: ~~~~~ ruby Redcarpet::Render::HTML.new(render_options = {}) ~~~~~ Initializes an HTML renderer. The following flags are available: * `:filter_html`: do not allow any user-inputted HTML in the output. * `:no_images`: do not generate any `