kramdown-1.15.0/0000755000004100000410000000000013164166452013460 5ustar www-datawww-datakramdown-1.15.0/Rakefile0000644000004100000410000001630413164166452015131 0ustar www-datawww-data# -*- ruby -*- # load all optional developer libraries begin require 'rubygems' require 'rubygems/package_task' rescue LoadError end begin require 'webgen/page' rescue LoadError end begin gem 'rdoc' if RUBY_VERSION >= '1.9' require 'rdoc/task' require 'rdoc/rdoc' class RDoc::RDoc alias :old_parse_files :parse_files def parse_files(options) file_info = old_parse_files(options) require 'kramdown/options' # Add options documentation to Kramdown::Options module opt_module = @store.all_classes_and_modules.find {|m| m.full_name == 'Kramdown::Options'} opt_defs = Kramdown::Options.definitions.sort.collect do |n, definition| desc = definition.desc.split(/\n/).map {|l| " #{l}"} desc[-2] = [] desc = desc.join("\n") "[#{n} (type: #{definition.type}, default: #{definition.default.inspect})]\n#{desc}\n\n" end opt_module.comment.text += "\n== Available Options\n\n" << opt_defs.join("\n\n") file_info end end rescue LoadError end begin require 'rcov/rcovtask' rescue LoadError end require 'fileutils' require 'rake/clean' require 'rake/testtask' require 'rake/packagetask' require 'erb' $:.unshift('lib') require 'kramdown' # End user tasks ################################################################ task :default => :test desc "Install using setup.rb" task :install do ruby "setup.rb config" ruby "setup.rb setup" ruby "setup.rb install" end task :clobber do ruby "setup.rb clean" end if defined?(Webgen) desc "Generate the HTML documentation" task :htmldoc do ruby "-Ilib -S webgen" end CLOBBER << "htmldoc/" CLOBBER << "webgen-tmp" end if defined? RDoc::Task rd = RDoc::Task.new do |rdoc| rdoc.rdoc_dir = 'htmldoc/rdoc' rdoc.title = 'kramdown' rdoc.main = 'lib/kramdown/document.rb' rdoc.rdoc_files.include('lib') end end if defined?(Webgen) && defined?(RDoc::Task) desc "Build the whole user documentation" task :doc => [:rdoc, 'htmldoc'] end tt = Rake::TestTask.new do |test| test.warning = false test.libs << 'test' test.test_files = FileList['test/test_*.rb'] end # Release tasks and development tasks ############################################ namespace :dev do SUMMARY = 'kramdown is a fast, pure-Ruby Markdown-superset converter.' DESCRIPTION = < CONTRIBUTERS` `echo "======= ====" >> CONTRIBUTERS` `git log | grep ^Author: | sed 's/^Author: //' | sort | uniq -c | sort -nr >> CONTRIBUTERS` end CLOBBER << "man/man1/kramdown.1" file 'man/man1/kramdown.1' => ['man/man1/kramdown.1.erb'] do puts "Generating kramdown man page" File.open('man/man1/kramdown.1', 'w+') do |file| data = ERB.new(File.read('man/man1/kramdown.1.erb')).result(binding) file.write(Kramdown::Document.new(data).to_man) end end Rake::PackageTask.new('kramdown', Kramdown::VERSION) do |pkg| pkg.need_tar = true pkg.need_zip = true pkg.package_files = PKG_FILES end if defined? Gem spec = Gem::Specification.new do |s| #### Basic information s.name = 'kramdown' s.version = Kramdown::VERSION s.summary = SUMMARY s.description = DESCRIPTION s.license = 'MIT' #### Dependencies, requirements and files s.files = PKG_FILES.to_a s.require_path = 'lib' s.executables = ['kramdown'] s.default_executable = 'kramdown' s.required_ruby_version = '>= 2.0' s.add_development_dependency 'minitest', '~> 5.0' s.add_development_dependency 'coderay', '~> 1.0.0' s.add_development_dependency 'rouge' s.add_development_dependency 'stringex', '~> 1.5.1' s.add_development_dependency 'prawn', '~> 2.0' s.add_development_dependency 'prawn-table', '~> 0.2.2' s.add_development_dependency 'ritex', '~> 1.0' s.add_development_dependency 'itextomml', '~> 1.5' #### Documentation s.has_rdoc = true s.rdoc_options = ['--main', 'lib/kramdown/document.rb'] #### Author and project details s.author = 'Thomas Leitner' s.email = 't_leitner@gmx.at' s.homepage = "http://kramdown.gettalong.org" end task :gemspec => [ 'CONTRIBUTERS', 'VERSION', 'man/man1/kramdown.1'] do print "Generating Gemspec\n" contents = spec.to_ruby File.open("kramdown.gemspec", 'w+') {|f| f.puts(contents)} end Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = true pkg.need_tar = true end end if defined?(Webgen) && defined?(Gem) && defined?(Rake::RDocTask) desc 'Release Kramdown version ' + Kramdown::VERSION task :release => [:clobber, :package, :publish_files, :publish_website] end if defined?(Gem) desc "Upload the release to Rubygems" task :publish_files => [:package] do sh "gem push pkg/kramdown-#{Kramdown::VERSION}.gem" puts 'done' end end desc "Upload the website" task :publish_website => ['doc'] do puts "Transfer manually!!!" # sh "rsync -avc --delete --exclude 'MathJax' --exclude 'robots.txt' htmldoc/ gettalong@rubyforge.org:/var/www/gforge-projects/kramdown/" end if defined? Rcov Rcov::RcovTask.new do |rcov| rcov.libs << 'test' end end CODING_LINE = "# -*- coding: utf-8 -*-\n" COPYRIGHT=< # # This file is part of kramdown which is licensed under the MIT. #++ # EOF desc "Insert/Update copyright notice" task :update_copyright do inserted = false Dir["lib/**/*.rb", "test/**/*.rb"].each do |file| if !File.read(file).start_with?(CODING_LINE + COPYRIGHT) inserted = true puts "Updating file #{file}" old = File.read(file) if !old.gsub!(/\A#{Regexp.escape(CODING_LINE)}#\n#--.*?\n#\+\+\n#\n/m, CODING_LINE + COPYRIGHT) old.gsub!(/\A(#{Regexp.escape(CODING_LINE)})?/, CODING_LINE + COPYRIGHT + "\n") end File.open(file, 'w+') {|f| f.puts(old)} end end puts "Look through the above mentioned files and correct all problems" if inserted end end task :gemspec => ['dev:gemspec'] task :clobber => ['dev:clobber'] kramdown-1.15.0/data/0000755000004100000410000000000013164166452014371 5ustar www-datawww-datakramdown-1.15.0/data/kramdown/0000755000004100000410000000000013164166452016213 5ustar www-datawww-datakramdown-1.15.0/data/kramdown/document.latex0000644000004100000410000000236413164166452021075 0ustar www-datawww-data<% encmap = { 'UTF-8' => 'utf8x', 'US-ASCII' => 'ascii', 'ISO-8859-1' => 'latin1', 'ISO-8859-2' => 'latin2', 'ISO-8859-3' => 'latin3', 'ISO-8859-4' => 'latin4', 'ISO-8859-5' => 'latin5', 'ISO-8859-9' => 'latin9', 'ISO-8859-10' => 'latin10', 'CP850' => 'cp850', 'CP852' => 'cp852', 'CP858' => 'cp858', 'CP437' => 'cp437', 'CP865' => 'cp865', 'CP1250' => 'cp120', 'CP1252' => 'cp1252', 'CP1257' => 'cp1257' } %> \documentclass{scrartcl} <% if RUBY_VERSION >= '1.9' %> \usepackage[<%= encmap[@body.encoding.name] %>]{inputenc} <% else %> \usepackage[mathletters]{ucs} \usepackage[utf8x]{inputenc} <% end %> \usepackage[T1]{fontenc} \usepackage{listings} <% @converter.data[:packages].each {|pkg| %>\usepackage{<%= pkg %>} <% } %> \usepackage{hyperref} <% if @converter.data[:packages].include?('fancyvrb') %> \VerbatimFootnotes <% end %> <% if @converter.data[:packages].include?('acronym') %> <% @converter.root.options[:abbrev_defs].each_pair do |k,v| %>\acrodef{<%= @converter.normalize_abbreviation_key(k) %>}[<%= k %>]{<%= @converter.escape(v) %>} <% end %> <% end %> \setcounter{footnote}{<%= @converter.options[:footnote_nr] - 1 %>} \hypersetup{colorlinks=true,urlcolor=blue} \begin{document} <%= @body %> \end{document} kramdown-1.15.0/data/kramdown/document.html0000644000004100000410000000117313164166452020721 0ustar www-datawww-data <% if @converter.root.options[:encoding] %> <% end %> <% extend ::Kramdown::Utils::Html title = '' h = @converter.root.children.find {|c| c.type == :header} if h collector = lambda {|c| c.children.collect {|cc| cc.type == :text ? escape_html(cc.value, :text) : collector.call(cc)}.join('')} title = collector.call(h) end %> <%= title %> <%= @body %> kramdown-1.15.0/bin/0000755000004100000410000000000013164166452014230 5ustar www-datawww-datakramdown-1.15.0/bin/kramdown0000755000004100000410000000356513164166452016011 0ustar www-datawww-data#!/usr/bin/env ruby # -*- coding: utf-8 -*- # #-- # Copyright (C) 2009-2015 Thomas Leitner # # This file is part of kramdown which is licensed under the MIT. #++ # require 'optparse' require 'kramdown' options = {} format = ['html'] OptionParser.new do |opts| opts.banner = "Usage: kramdown [options] [FILE FILE ...]" opts.summary_indent = ' '*4 opts.separator "" opts.separator "Command line options:" opts.separator "" opts.on("-i", "--input ARG", "Specify the input format: kramdown (default), " \ "html, GFM or markdown") {|v| options[:input] = v} opts.on("-o", "--output ARG", Array, "Specify one or more output formats separated by commas: " \ "html (default),", "kramdown, latex, pdf, man or remove_html_tags") {|v| format = v} opts.on("-v", "--version", "Show the version of kramdown") do puts Kramdown::VERSION exit end opts.on("-h", "--help", "Show the help") do puts opts.summarize('', 5, 72) exit end opts.separator "" opts.separator "kramdown options:" opts.separator "" Kramdown::Options.definitions.sort.each do |n, definition| no = n.to_s.tr('_', '-') if definition.type == Kramdown::Options::Boolean opts.on("--[no-]#{no}") {|v| options[n] = Kramdown::Options.parse(n, v)} else type = definition.type type = String if type == Symbol || type == Object opts.on("--#{no} ARG", type) {|v| options[n] = Kramdown::Options.parse(n, v)} end definition.desc.split(/\n/).each do |line| opts.separator opts.summary_indent + ' '*6 + line end opts.separator '' end end.parse! begin doc = Kramdown::Document.new(ARGF.read, options) result = '' format.each {|f| result = doc.send("to_#{f}")} puts result doc.warnings.each {|warn| $stderr.puts "Warning: #{warn}"} rescue Kramdown::Error => e $stderr.puts "Error: #{e.message}" exit(1) end kramdown-1.15.0/doc/0000755000004100000410000000000013164166452014225 5ustar www-datawww-datakramdown-1.15.0/doc/_design.scss0000644000004100000410000002215213164166452016534 0ustar www-datawww-data/* Based on the Less Framework 4 http://lessframework.com by Joni Korpi License: http://opensource.org/licenses/mit-license.php */ /***** Variables for easy customization *****/ /* the baseline height in px */ $baseline-height: 24; /* The overlay color for the background image */ $bg-grad-color: rgba(255,255,128,0.1); /* The font size of the logo in px */ $logo-size: 36; /* Color settings */ $link-color: #1666A3; /* Resets ------ */ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, hr, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figure, figcaption, hgroup, menu, footer, header, nav, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; } article, aside, canvas, figure, figure img, figcaption, hgroup, footer, header, nav, section, audio, video { display: block; } a img {border: 0;} /* Typography presets ------------------ */ .gigantic { font-size: 59px; line-height: 72px; } .huge { font-size: 36px; line-height: 48px; } .large { font-size: 23px; line-height: 24px; } .bigger { font-size: 18px; line-height: 24px; } .big { font-size: 14px; line-height: 24px; } body { font: 14px/24px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; } .small, small { font-size: 12px; line-height: 24px; } *:target::after { content: " ☜"; } /* Typographics grid overlay */ .grid{ background-image: -moz-linear-gradient(top, rgba(0,0,0,0) 95%, rgba(0,0,0,0.3) 100%); /* FF3.6+ */ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(95%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.3))); /* Chrome,Safari4+ */ background-image: -webkit-linear-gradient(top, rgba(0,0,0,0) 95%,rgba(0,0,0,0.3) 100%); /* Chrome10+,Safari5.1+ */ background-image: -o-linear-gradient(top, rgba(0,0,0,0) 95%, rgba(0,0,0,0.3) 100%); /* Opera11.10+ */ background-image: -ms-linear-gradient(top, rgba(0,0,0,0) 95%,rgba(0,0,0,0.3) 100%); /* IE10+ */ background-image: linear-gradient(top, rgba(0,0,0,0.3) 95%,rgba(0,0,0,0.3) 100%); /* W3C */ -webkit-background-size: 100% #{$baseline-height}px; -o-background-size: 100% #{$baseline-height}px; background-size: 100% #{$baseline-height}px; } /* Basic mixins */ @mixin background { background-image: -moz-linear-gradient($bg-grad-color, $bg-grad-color), url('bg.png'); background-image: -webkit-linear-gradient($bg-grad-color, $bg-grad-color), url('bg.png'); background-image: -o-linear-gradient($bg-grad-color, $bg-grad-color), url('bg.png'); background-image: -ms-linear-gradient($bg-grad-color, $bg-grad-color), url('bg.png'); background-image: linear-gradient($bg-grad-color, $bg-grad-color), url('bg.png'); } @mixin typography($size: big) { h3, h4, h5, h6, p, ul, ol, dl, pre, blockquote, table { margin-top: 24px; margin-bottom: 24px; } @if $size == big { h1 { @extend .huge } h2 { @extend .large } h3 { @extend .bigger } h4,h5,h6 { @extend .big } } @else { h1 { @extend .large } h2 { @extend .bigger } h3,h4,h5,h6 { @extend .big } } h1, h2, h3, h4, h5, h6 { font-weight: normal; padding-left: 48px; margin-left: -48px; margin-top: 36px; margin-bottom: -12px; } ul, ol, dd { padding-left: 24px; } ul ul, ul ol, ol ul, ol ol { margin-top: 0; margin-bottom: 0; } pre { padding-left: 12px; padding-right: 12px; border: 1px solid #ccc; font-family: "Bitstream Vera Sans Mono", Consolas, monospace; } dt { font-weight: bold; } a { color: $link-color; text-decoration: underline; } a:hover, a:link { color: $link-color / 2; } } /* Default Layout: 992px. Gutters: 24px. Outer margins: 48px. Leftover space for scrollbars @1024px: 32px. ------------------------------------------------------------------------------- cols 1 2 3 4 5 6 7 8 9 10 px 68 160 252 344 436 528 620 712 804 896 */ body { width: 992px; margin: 0 auto 48px; color: rgb(60,60,60); -webkit-text-size-adjust: 100%; /* Stops Mobile Safari from auto-adjusting font-sizes */ @include background; } body > header { position: relative; padding: 12px; font-family: Verdana; color: #eee; -moz-box-shadow: 0 0 24px rgba(0,0,0,0.6); -webkit-box-shadow: 0 0 24px rgba(0,0,0,0.6); box-shadow: 0 0 24px rgba(0,0,0,0.6); z-index: 1; } #logo { font-size: #{$logo-size}px; line-height: #{$baseline-height * (floor($logo-size / $baseline-height) + 1)}px; margin: 12px; text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5); a { color: #eee; text-decoration: none; &:hover { color: #fff; } } } #slogan { font-size: 100%; margin: 12px; text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5); } nav { position: absolute; bottom: 0px; right: 0px; background-color: rgba(255,255,255,0.1); li { display: inline-block; } ul { margin: 0; padding: 0; } a, span { display: block; padding: 12px; color: #ccc; text-decoration: none; } span { background-color: rgba(255,255,255,0.3); } a:hover { background-color: rgba(255,255,255,0.3); } } #wrapper { clear: both; position: relative; background-color: white; -moz-box-shadow: 0 0 24px rgba(0,0,0,0.6); -webkit-box-shadow: 0 0 24px rgba(0,0,0,0.6); box-shadow: 0 0 24px rgba(0,0,0,0.6); } aside { float: right; right: 0; background-color: white; width: 252px; padding: 24px; @include typography(small); h1, h2, h3, h4, h5, h6 { padding-left: 48px; margin-left: -48px; } } aside.banner { @include background; position: relative; width: inherit; margin: 0; float: none; padding: 24px; border: 10px solid rgba(255,255,255,0.1); color: #ccc; font-size: 36px; line-height: 48px; a { color: #ccc; text-decoration: underline; } a:hover { background-color: rgba(255,255,255,0.3); } p { margin: 0; } p + p { margin-top: 24px; } } #content { width: 620px; padding: 24px 48px; @include typography(big); } footer { background-color: rgba(255,255,255,0.1); min-height: 24px; color: #eee; } /* Tablet Layout: 768px. Gutters: 24px. Outer margins: 28px. Inherits styles from: Default Layout. ----------------------------------------------------------------- cols 1 2 3 4 5 6 7 8 px 68 160 252 344 436 528 620 712 */ @media only screen and (min-width: 768px) and (max-width: 1005px) { body { width: 716px; } body > header { padding: 0; } aside { position: static; float: right; } nav { position: relative; margin-top: 12px; } } /* Mobile Layout: 320px. Gutters: 24px. Outer margins: 34px. Inherits styles from: Default Layout. --------------------------------------------- cols 1 2 3 px 68 160 252 */ @media only screen and (max-width: 767px) { body { width: 320px; } body > header { padding: 0; } nav { position: relative; margin-top: 12px; } aside { position: relative; } #content, aside { width: 296px; padding: 24px 12px; } #content { h1, h2, h3, h4, h5, h6 { padding-left: 12px; margin-left: -12px; } } } /* Wide Mobile Layout: 480px. Gutters: 24px. Outer margins: 22px. Inherits styles from: Default Layout, Mobile Layout. ------------------------------------------------------------ cols 1 2 3 4 5 px 68 160 252 344 436 */ @media only screen and (min-width: 480px) and (max-width: 767px) { body { width: 90%; } aside { position: relative; } #content, aside { width: inherit; padding: 24px 48px; } #content { h1, h2, h3, h4, h5, h6 { padding-left: 48px; margin-left: -48px; } } } /* Retina media query. Overrides styles for devices with a device-pixel-ratio of 2+, such as iPhone 4. ----------------------------------------------- */ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { body { } } kramdown-1.15.0/doc/installation.page0000644000004100000410000000463513164166452017574 0ustar www-datawww-data--- title: Installation in_menu: true sort_info: 5 --- # Download & Installation ## Dependencies Since kramdown is written in Ruby, you just need the [Ruby interpreter](http://www.ruby-lang.org), version 1.8.5, 1.8.6, 1.8.7, 1.9.2, 1.9.3 or 2.x. There are no other dependencies. ## Compatibility Notes kramdown should work on any platform which supports Ruby. It has been successfully tested on the following platforms: * Linux with Ruby 1.8.7, 1.9.3, 2.x, jruby 1.7.19 and jruby 9.0.0.0. See the platform specific installation notes for more information! ## Platform Specific Installation Instructions ### Linux There are a variety of Linux distributions out there with different package management systems. So we will focus on instructions for Ubuntu 15.04 here (which should probably also work for any newer Ubuntu version or any recent Debian based distribution). After running the following commands, kramdown is installed and ready to use: sudo apt-get install ruby sudo gem install kramdown ### Mac OS X Mac OS X Snow Leopard comes with Ruby and Rubygems preinstalled. So installing kramdown is as easy as running: sudo gem install kramdown ### Windows You need to install Ruby first. This can easily be done by using the [RubyInstaller] - just download the installation binary and run it. After that open a command shell (select `Start -> Run...`, then enter `cmd` and click on `Ok`) and type in the following: gem install kramdown [RubyInstaller]: http://rubyinstaller.org ## Generic Installation Instructions ### Using Rubygems If you are using Rubygems, installing the latest version of kramdown is as simple as executing gem install kramdown ### Manual Installation The latest version of kramdown can always be downloaded as `.tar.gz` or `.zip` via the [Github releases page][ghreleases]. After the download the package needs to be decompressed and then you can install kramdown using the included `setup.rb` installation method: $ ruby setup.rb config $ ruby setup.rb setup $ ruby setup.rb install [ghreleases]: https://github.com/gettalong/kramdown/releases ### Using the repository version kramdown uses git as its versioning system and kramdown's repository is hosted on GitHub. The repository always contains a clean state of the current development version of kramdown. To check out kramdown use the following command: git clone git://github.com/gettalong/kramdown.git kramdown-1.15.0/doc/sidebar.template0000644000004100000410000000241713164166452017377 0ustar www-datawww-data

Support kramdown

If you like kramdown and would like to support it, you are welcome to make a small donation (Patreon, PayPal or Pledgie) -- it will surely be appreciated! Thanks!

Become a Patron!
Click here to lend your support to: kramdown and make a donation at pledgie.com !

Sponsors

GROSSWEBER provides software development consulting and training services. We like to work on open source. We use it heavily. We love kramdown!

kramdown-1.15.0/doc/tests.page0000644000004100000410000001152513164166452016231 0ustar www-datawww-data--- title: Tests and Benchmark --- # Tests and Benchmark ## Tests There exist several test suites for testing the correctness of a Markdown implementation. The original [Markdown Test Suite] is the standard which one needs to test against. The [PHP Markdown suite][MDTest] contains the original test suite and several more tests (some specifically geared towards the extension of the PHP Markdown Extra package). I have used the latter test tool to roughly verify that kramdown is able to parse standard Markdown. However, since the syntax used by kramdown varies slightly from standard Markdown most of the tests fail - which is fine. When looking at the differences one can see that the failures result from these differences. Besides using the above mentioned test suite kramdown comes with its own set of tests which is used to verify that the implementation matches the kramdown specification. If you believe you have found a bug in the implementation, please follow these steps: * Check the [syntax page](syntax.html) and see if the behaviour is not intended. * If the behaviour is not intended and it seems that kramdown should parse some text in another fashion, please open a [bug report] and attach two files: one with the text and one with the HTML conversion you think is correct. [bug report]: http://github.com/gettalong/kramdown/issues ## Benchmark kramdown comes with a small benchmark to test how fast it is in regard to four other Ruby Markdown implementations: Maruku, BlueFeather, BlueCloth, RDiscount and Redcarpet. The first two are written using only Ruby, the latter three are written in C and need to be compiled. As one can see below, kramdown is currently (September 2014) ~3x faster than Maruku, ~4.5x faster than BlueFeather but ~30x slower than RDiscount and ~150x slower than Redcarpet:

Running tests on 2014-09-16 under ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

Test using file mdsyntax.text and 20 runs
Rehearsal ----------------------------------------------------
kramdown 1.4.2     0.900000   0.010000   0.910000 (  0.914992)
Maruku 0.7.1       2.360000   0.040000   2.400000 (  2.403571)
BlueFeather 0.41   3.760000   0.010000   3.770000 (  3.776421)
BlueCloth 2.2.0    0.050000   0.000000   0.050000 (  0.050221)
RDiscount 2.1.7    0.020000   0.000000   0.020000 (  0.024180)
redcarpet 3.1.2    0.010000   0.000000   0.010000 (  0.004579)
------------------------------------------- total: 7.160000sec

                       user     system      total        real
kramdown 1.4.2     0.830000   0.000000   0.830000 (  0.834144)
Maruku 0.7.1       2.250000   0.030000   2.280000 (  2.286579)
BlueFeather 0.41   3.680000   0.010000   3.690000 (  3.693769)
BlueCloth 2.2.0    0.050000   0.000000   0.050000 (  0.044831)
RDiscount 2.1.7    0.020000   0.000000   0.020000 (  0.022847)
redcarpet 3.1.2    0.010000   0.000000   0.010000 (  0.004601)

Real time of X divided by real time of kramdown
Maruku             2.7412
BlueFeather        4.4282
BlueCloth          0.0537
RDiscount          0.0274
redcarpet          0.0055

Test using file mdbasics.text and 20 runs
Rehearsal ----------------------------------------------------
kramdown 1.4.2     0.150000   0.000000   0.150000 (  0.149989)
Maruku 0.7.1       0.580000   0.010000   0.590000 (  0.584910)
BlueFeather 0.41   0.780000   0.000000   0.780000 (  0.788740)
BlueCloth 2.2.0    0.020000   0.000000   0.020000 (  0.014700)
RDiscount 2.1.7    0.000000   0.000000   0.000000 (  0.007692)
redcarpet 3.1.2    0.010000   0.000000   0.010000 (  0.002064)
------------------------------------------- total: 1.550000sec

                       user     system      total        real
kramdown 1.4.2     0.150000   0.000000   0.150000 (  0.151586)
Maruku 0.7.1       0.520000   0.000000   0.520000 (  0.525707)
BlueFeather 0.41   0.770000   0.010000   0.780000 (  0.763559)
BlueCloth 2.2.0    0.020000   0.000000   0.020000 (  0.015509)
RDiscount 2.1.7    0.010000   0.000000   0.010000 (  0.006545)
redcarpet 3.1.2    0.000000   0.000000   0.000000 (  0.001475)

Real time of X divided by real time of kramdown
Maruku             3.468
BlueFeather        5.0371
BlueCloth          0.1023
RDiscount          0.0432
redcarpet          0.0097
And here are some graphs which show the execution times of the various kramdown releases on different Ruby interpreters: ![ruby 1.8.7p302]({relocatable: img/graph-ruby-1.8.7-302.png}) ![ruby 1.9.3p448]({relocatable: img/graph-ruby-1.9.3p448-448.png}) ![ruby 2.0.0p247]({relocatable: img/graph-ruby-2.0.0p247-247.png}) ![ruby 2.1.2p95]({relocatable: img/graph-ruby-2.1.2p95-95.png}) ![jruby 1.7.15]({relocatable: img/graph-jruby-1.7.15-392.png}) ![rubinius 2.2.10]({relocatable: img/graph-rubinius-2.2.10-0.png}) [Markdown Test Suite]: http://daringfireball.net/projects/downloads/MarkdownTest_1.0.zip [MDTest]: http://www.michelf.com/docs/projets/mdtest-1.0.zip kramdown-1.15.0/doc/quickref.page0000644000004100000410000003666313164166452016712 0ustar www-datawww-data--- title: Quick Reference in_menu: true sort_info: 9 --- name:sidebar
Become a Patron!

Contents

{menu: {options: {descendants: true, levels: [2,6]}}} --- name:content # Quick Reference Below are examples of all available structural elements that can be used in a kramdown text. Since the kramdown syntax is a superset of the Markdown syntax, only a small part of the available syntax is not available in standard Markdown syntax. Note, that only the most basic syntax information is given. However, a link to the detailed syntax for each element is provided (which also details the differences to the standard Markdown syntax). The quick reference is for version **<%= ::Kramdown::VERSION %>** of the syntax documentation. kramdown has two main classes of elements: block and span-level elements. Block-level elements are used to create paragraphs, headers, lists and so on whereas span-level elements are used to markup text phrases as emphasized, as a link and so on. All examples below feature the kramdown source, the converted HTML source (shown when hovering over the kramdown source) and the output as it appears in the browser. This looks like this:
kramdown example code
Example code converted to HTML
Live browser view of example code
# Block-level Elements - Main Structural Elements ## Paragraphs {kdlink: {oid: paragraphs, part: "paragraphs"}} Consecutive lines of text are considered to be one paragraph. As with other block level elements you have to add a blank line to separate it from the following block-level element: {kdexample::} The first paragraph. Another paragraph {kdexample} Explicit line breaks in a paragraph can be made by using two spaces or two backslashes at the end of a line: {kdexample::} This is a paragraph which contains a hard line break. {kdexample} ## Headers {kdlink: {oid: headers, part: "headers"}} kramdown supports Setext style headers and atx style headers. A header must always be preceded by a blank line except at the beginning of the document: {kdexample::} First level header ================== Second level header ------------------- {kdexample} {kdexample::} # H1 header ## H2 header ### H3 header #### H4 header ##### H5 header ###### H6 header {kdexample} If you set the option `auto_ids` to `false` (for example, by using the `options` extension, see [Extensions](#extensions)), then the automatic header ID generation is turned off: {kdexample::} {::options auto_ids="false" /} # A header without an ID {kdexample} ## Blockquotes {kdlink: {oid: blockquotes, part: "blockquotes"}} A blockquote is started using the `>` marker followed by an optional space; all following lines that are also started with the blockquote marker belong to the blockquote. You can use any block-level elements inside a blockquote: {kdexample::} > A sample blockquote. > > >Nested blockquotes are > >also possible. > > ## Headers work too > This is the outer quote again. {kdexample} You may also be lazy with the `>` markers as long as there is no blank line: {kdexample::} > This is a blockquote continued on this and this line. But this is a separate paragraph. {kdexample} ## Code Blocks {kdlink: {oid: code-blocks, part: "code blocks"}} kramdown supports two different code block styles. One uses lines indented with either four spaces or one tab whereas the other uses lines with tilde characters as delimiters -- therefore the content does not need to be indented: {kdexample::} This is a sample code block. Continued here. {kdexample} {kdexample::} ~~~~~~ This is also a code block. ~~~ Ending lines must have at least as many tildes as the starting line. ~~~~~~~~~~~~ {kdexample} The following is a code block with a language specified: {kdexample::} ~~~ ruby def what? 42 end ~~~ {kdexample} ## Horizontal Rules {kdlink: {oid: horizontal-rules, part: "horizontal rules"}} It is easy to insert a horizontal rule in kramdown: just use three or more asterisks, dashes or underscores, optionally separated by spaces or tabs, on an otherwise blank line: {kdexample::} * * * \--- _ _ _ _ --------------- {kdexample} ## Lists {kdlink: {oid: lists, part: "lists"}} kramdown supports ordered and unordered lists. Ordered lists are started by using a number followed by a period, a space and then the list item text. The content of a list item consists of block-level elements. All lines which have the same indent as the text of the line with the list marker belong to the list item: {kdexample::} 1. This is a list item 2. And another item 2. And the third one with additional text {kdexample} As with block quotes, you may be lazy when using the list item marker: {kdexample::} * A list item with additional text {kdexample} As the content consists of block-level elements you can do things like the following: {kdexample::} 1. This is a list item > with a blockquote # And a header 2. Followed by another item {kdexample} Nested lists are also easy to create: {kdexample::} 1. Item one 1. sub item one 2. sub item two 3. sub item three 2. Item two {kdexample} Lists can occur directly after other block-level elements, however, there has to be at least one blank line if you want to follow a paragraph with a list: {kdexample::} This is a paragraph. 1. This is NOT a list. 1. This is a list! {kdexample} Unordered lists are started by using an asterisk, a dash or a plus sign (they can be mixed) and a space. Apart from that unordered lists follow the same rules as ordered lists: {kdexample::} * Item one + Item two - Item three {kdexample} ## Definition Lists {kdlink: {oid: definition-lists, part: "definition lists"}} A definition list works similar to a normal list and is used to associate definitions with terms. Definition lists are started when a normal paragraph is followed by a line starting with a colon and then the definition text. One term can have many definitions and multiple terms can have the same definition. Each line of the preceding paragraph is assumed to contain one term, for example: {kdexample::} term : definition : another definition another term and another term : and a definition for the term {kdexample} If you insert a blank line before a definition (note: there must only be one blank line between the terms and the first definition), the definition will be wrapped in a paragraph: {kdexample::} term : definition : definition {kdexample} Each term can be styled using span-level elements and each definition is parsed as block-level elements, i.e. you can use any block-level in a definition. Just use the same indent for the lines following the definition line: {kdexample::} This *is* a term : This will be a para > a blockquote # A header {kdexample} ## Tables {kdlink: {oid: tables, part: "tables"}} kramdown supports a syntax for creating simple tables. A line starting with a pipe character (`|`) starts a table row. However, if the pipe characters is immediately followed by a dash (`-`), a separator line is created. Separator lines are used to split the table header from the table body (and optionally align the table columns) and to split the table body into multiple parts. If the pipe character is followed by an equal sign (`=`), the tables rows below it are part of the table footer. {kdexample::} | A simple | table | | with multiple | lines| {kdexample} {kdexample::} | Header1 | Header2 | Header3 | |:--------|:-------:|--------:| | cell1 | cell2 | cell3 | | cell4 | cell5 | cell6 | |---- | cell1 | cell2 | cell3 | | cell4 | cell5 | cell6 | |===== | Foot1 | Foot2 | Foot3 {: rules="groups"} {kdexample} ## HTML elements {kdlink: {oid: html-blocks, part: "HTML blocks"}} kramdown allows you to use block-level HTML tags (`div`, `p`, `pre`, ...) to markup whole blocks of text -- just start a line with a block-level HTML tag. kramdown syntax is normally not processed inside an HTML tag but this can be changed with the `parse_block_html` option. If this options is set to `true`, then the content of a block-level HTML tag is parsed by kramdown either as block level or span-level text, depending on the tag: {kdexample::}
Something that stays right and is not wrapped in a para.
{::options parse_block_html="true" /}
This is wrapped in a para.

This can contain only *span* level elements.

{kdexample} ## Block Attributes {kdlink: {oid: block-ials, part: "block IALs"}} {kdlink: {oid: attribute-list-definitions, part: "ALDs"}} You can assign any attribute to a block-level element. Just directly follow the block with a *block inline attribute list* (or short: block IAL). A block IAL consists of a left curly brace, followed by a colon, the attribute definitions and a right curly brace. Here is a simple example which sets the `title` attribute of a block quote: {kdexample::} > A nice blockquote {: title="Blockquote title"} {kdexample} As one often wants to set one or more CSS classes on an element, there is an easy shortcut: {kdexample::} > A nice blockquote {: .class1 .class2} {kdexample} A shortcut for setting the ID is also provided. Just prefix the ID with a hash symbol: {kdexample::} > A nice blockquote {: #with-an-id} {kdexample} Sometimes one wants to use the same attributes for many elements. kramdown allows you to define the attributes in one place with an *attribute list definition* (or short: ALD) and just reference this definition in a block IAL. An ALD has the same structure as a block IAL but the colon has to be replace with a colon, the reference name and another colon. By just using the reference name as-is in a block IAL, one can include the attributes of the referenced ALD: {kdexample::} {:refdef: .c1 #id .c2 title="title"} paragraph {: refdef} {kdexample} The order in a block IAL or ALD is important because later defined attributes overwrite (with the exception of the shortcut for CSS classes) prior defined attributes: {kdexample::} {:refdef: .c1 #id .c2 title="title"} paragraph {: refdef .c3 title="t" #para} {kdexample} ## Extensions {kdlink: {oid: extensions, part: "extensions"}} kramdown provides some less used functionality through a common syntax. This will allow the easy addition of other extensions if need arises. Currently, there are extensions for ignoring text (i.e. treating text as comment), for inserting arbitrary text as-is into the output and for setting kramdown options. Here is an example that shows how to insert comments into text: {kdexample::} This is a paragraph {::comment} This is a comment which is completely ignored. {:/comment} ... paragraph continues here. Extensions can also be used inline {::nomarkdown}**see**{:/}! {kdexample} As one can see from the above example, the syntax for extensions is nearly identical to that of ALDs. However, there is no trailing colon after the extension name and the extension end tag needs a slash between the colon and the extension name. One can also use the short form of the end tag, i.e. `{:/}`. Attribute definitions can be specified on the start tag by separating them with a space from the extension name. Also, if the extension does not have a body, there needs to be a slash right before the closing brace: {kdexample::} {::options auto_ids="false" /} # Header without id {kdexample} # Span-Level Elements - Text Modifiers ## Emphasis {kdlink: {oid: emphasis, part: "emphasis"}} Emphasis can be added to text by surrounding the text with either asterisks or underscores: {kdexample::} This is *emphasized*, _this_ too! {kdexample} Strong emphasis can be done by doubling the delimiters: {kdexample::} This is **strong**, __this__ too! {kdexample} The form with the asterisks can also be used to markup parts of words: {kdexample::} This w**ork**s as expected! {kdexample} ## Links and Images {kdlink: {oid: links-and-images, part: "links and images"}} A simple link can be created by surrounding the text with square brackets and the link URL with parentheses: {kdexample::} A [link](http://kramdown.gettalong.org) to the kramdown homepage. {kdexample} You can also add title information to the link: {kdexample::} A [link](http://kramdown.gettalong.org "hp") to the homepage. {kdexample} There is another way to create links which does not interrupt the text flow. The URL and title are defined using a reference name and this reference name is then used in square brackets instead of the link URL: {kdexample::} A [link][kramdown hp] to the homepage. [kramdown hp]: http://kramdown.gettalong.org "hp" {kdexample} If the link text itself is the reference name, the second set of square brackets can be omitted: {kdexample::} A link to the [kramdown hp]. [kramdown hp]: http://kramdown.gettalong.org "hp" {kdexample} Images can be created in a similar way: just use an exclamation mark before the square brackets. The link text will become the alternative text of the image and the link URL specifies the image source: {kdexample::} An image: ![gras](img/image.jpg) {kdexample} ## Inline Code {kdlink: {oid: code-spans, part: "code spans"}} Text phrases can be easily marked up as code by surrounding them with backticks: {kdexample::} Use `Kramdown::Document.new(text).to_html` to convert the `text` in kramdown syntax to HTML. {kdexample} If you want to use literal backticks in your code, just use two or more backticks as delimiters. The space right after the beginning delimiter and the one right before the closing delimiter are ignored: {kdexample::} Use backticks to markup code, e.g. `` `code` ``. {kdexample} ## Footnotes {kdlink: {oid: footnotes, part: "footnotes"}} Footnotes can easily be used in kramdown. Just set a footnote marker (consists of square brackets with a caret and the footnote name inside) in the text and somewhere else the footnote definition (which basically looks like a reference link definition): {kdexample::} This is a text with a footnote[^1]. [^1]: And here is the definition. {kdexample} The footnote definition can contain any block-level element, all lines following a footnote definition indented with four spaces or one tab belong to the definition: {kdexample::} This is a text with a footnote[^2]. [^2]: And here is the definition. > With a quote! {kdexample} As can be seen above the footnote name is only used for the anchors and the numbering is done automatically in document order. Repeated footnote markers will link to the same footnote definition. ## Abbreviations {kdlink: {oid: abbreviations, part: "abbreviations"}} Abbreviations will work out of the box once you add an abbreviation definition. So you can just write the text and add the definitions later on. {kdexample::} This is an HTML example. *[HTML]: Hyper Text Markup Language {kdexample} ## HTML Elements {kdlink: {oid: html-spans, part: "HTML spans"}} HTML is not only supported on the block-level but also on the span-level: {kdexample::} This is written in red. {kdexample} ## Inline Attributes {kdlink: {oid: span-ials, part: "span IALs"}} As with a block-level element you can assign any attribute to a span-level elements using a *span inline attribute list* (or short: span IAL). A span IAL has the same syntax as a block IAL and must immediately follow the span-level element: {kdexample::} This is *red*{: style="color: red"}. {kdexample} kramdown-1.15.0/doc/news.page0000644000004100000410000000154013164166452016037 0ustar www-datawww-data--- title: News in_menu: false sort_info: 30 --- pipeline:tags,blocks,fragments

News

Atom-Feed --- name:newsdata pipeline:erb <% opts = {:alcn => '/news/*.html', :sort => 'sort_info', :reverse => true, :flatten => true} context.website.ext.item_tracker.add(context.dest_node, :nodes, :node_finder_option_set, {:opts => opts, :ref_alcn => context.node.alcn}, :content) context.website.ext.node_finder.find(opts, context.node).each do |node| # context.options['contentprocessor.kramdown.options'] = {:auto_id_prefix => node.lcn.tr('.', '-')} %>
Published on <%= node['created_at'].strftime("%A, %d %B %Y") %>
<%= context.render_block(:name => 'content', :chain => [node]) %>
<% end %> kramdown-1.15.0/doc/default.scss0000644000004100000410000000743313164166452016555 0ustar www-datawww-data@import 'design'; a:hover { background-color: rgba(0,0,0,0.1); } aside.banner { font-size: 18px; line-height: 27px; } aside a { text-decoration: none; &:hover, &:link { text-decoration: underline; } } #content { blockquote.information { border-left: 12px solid #080; background-color: #bfb; padding: 12px 12px 12px 0; margin-left: -48px; padding-left: 48px; } blockquote.markdown-difference { border-left: 12px solid #dc0; background-color: #ffa; padding: 12px 12px 12px 0; margin-left: -48px; padding-left: 48px; &:before { content: "Difference to Standard Markdown"; display: block; font-weight: bold; } } blockquote pre { border: none; } table { border-collapse: collapse; margin-left: auto; margin-right: auto; width: 100%; td, th { padding: 3px 5px; } th { background-color: #080; color: white; } } pre.show-whitespaces .ws-space { background-color: #f44; } pre.show-whitespaces .ws-space-l { background-color: #f22; } pre.show-whitespaces .ws-space-r { background-color: #f00; } pre.show-whitespaces .ws-tab { background-color: #ff4; } pre.show-whitespaces .ws-tab-l { background-color: #ff2; } pre.show-whitespaces .ws-tab-r { background-color: #ff0; } pre.show-whitespaces.ws-lr .ws-tab { background-color: inherit; } pre.show-whitespaces.ws-lr .ws-space { background-color: inherit; opacity: 0; } table.kdexample td { vertical-align: top; } table.kdexample pre { margin: 5px 0px; } .kdexample:hover .kdexample-after-source { display: block; } .kdexample-after-source { display: none; background-color: #ffffee; border: 2px solid #e6e8e9; margin: 0 10px; padding: 5px; } .kdexample-after-live { background-color: #eeffee; border: 2px solid #e6e8e9; margin: 5px 0px 12px; padding: 5px; } div.kdsyntaxlink { float: right; position: relative; top: -17px; padding: 5px; border: 1px solid #e6e8e9; margin-right: 10px; margin-left: 10px; a { text-decoration: none; } } } .news-item { border-top: 2px solid #ddd; margin-top: 46px; } .news-date { float: right; margin-top: 2px; font-size: small; color: #888; } footer { clear: both; font-size: 92%; text-align: left; a { color: #898989; &:hover { text-decoration: none; color: #666; } } } /* common rules */ acronym { cursor: help; border-bottom: 1px solid #777; } .float-left { float: left; } .float-right { float: right; } .a-left, tr.a-left td { text-align: left; } .a-center, tr.a-center td { text-align: center; } .a-right, tr.a-right td { text-align: right; } .clear { clear: both; } .inline-important { font-weight: bold; display: block; text-align: center; } .patreon, .patreon:hover { border-radius: 50px; padding: 5px 10px; margin: 0 5px; display: inline-block; text-decoration: none !important; background-color: #e6461a !important; box-shadow: 0px 0px 5px 5px #e6461a; color: white !important; font-weight: bold; &:hover { box-shadow: 0px 0px 0px 5px #e6461a; } } #call-to-arms { text-align: center; margin: 40px 0 10px; background-color: rgba(255, 255, 255, 0.18); padding: 30px; border-radius: 100px; } kramdown-1.15.0/doc/default.template0000644000004100000410000000477113164166452017417 0ustar www-datawww-data {title:} | kramdown

kramdown

fast, pure-Ruby Markdown-superset converter

<% if context.content_node.blocks.has_key?('intro') %> <% end %>
Copyright © 2009-2016 Thomas Leitner
Generated by webgen
kramdown-1.15.0/doc/documentation.page0000644000004100000410000000541413164166452017740 0ustar www-datawww-data--- title: Documentation in_menu: true sort_info: 7 --- # kramdown Documentation ## Overview kramdown is first and foremost a library for converting text written in a superset of Markdown to HTML. However, due to its modular architecture it is able to support additional input and output formats. The following input and output formats are currently supported: * Input: [kramdown](parser/kramdown.html) (a superset of Markdown), [Markdown](parser/markdown.html), [Github Flavored Markdown](parser/gfm.html), [HTML](parser/html.html) * Output: [HTML](converter/html.html), [LaTeX](converter/latex.html), [kramdown](converter/kramdown.html), [RemoveHtmlTags](converter/remove_html_tags.html) (a special converter which removes HTML tags, normally used in conjunction with the LaTeX or kramdown converters) The [kramdown syntax page](syntax.html) describes in detail what is supported and how it differs from standard Markdown. For all available options have a look at the [options documentation](options.html) or have a look at a parser/converter page to see which options they support! ## Usage {:ruby: .language-ruby} The kramdown package provides two ways for using it: * **As a library** kramdown uses basically the same API as [RedCloth], [BlueCloth] and [Maruku]: require 'kramdown' puts Kramdown::Document.new(text).to_html {:ruby} The second parameter to the `new` call is an options hash for (de)activating certain features. For example, to disable automatic header ID generation, you can do the following: puts Kramdown::Document.new(text, :auto_ids => false).to_html {:ruby} The default parser used is `kramdown`, however, you can select a different one with the `:input` option: puts Kramdown::Document.new(text, :input => 'html').to_latex {:ruby} You can also reuse the created document object to produce multiple outputs: doc = Kramdown::Document.new(text, :input => 'html') puts doc.to_html puts doc.to_latex {:ruby} More information on how to use or extend kramdown can be found in the [API documentation](rdoc/index.html)! * **As an application** Together with the library files a binary called `kramdown` is shipped which can be used to convert text in any supported input format to any supported output format. It either reads from the files specified as the command line arguments or from the standard input. For example: kramdown path/to/kramdown/doc/syntax.page The input and output formats as well as all available kramdown options are supported through command line switches. ## Tests kramdown uses various test suites to verify the correct working of the parsers and converters. For more information, have a look at the [tests document](tests.html). {include_file: doc/links.markdown} kramdown-1.15.0/doc/syntax.page0000644000004100000410000022256613164166452016426 0ustar www-datawww-data--- title: Syntax in_menu: true sort_info: 10 --- name:sidebar
Become a Patron!

Contents

{menu: {options: {descendants: true, levels: [2,6]}}} --- name:content # kramdown Syntax This is version **<%= ::Kramdown::VERSION %>** of the syntax documentation. The kramdown syntax is based on the Markdown syntax and has been enhanced with features that are found in other Markdown implementations like [Maruku], [PHP Markdown Extra] and [Pandoc]. However, it strives to provide a strict syntax with definite rules and therefore isn't completely compatible with Markdown. Nonetheless, most Markdown documents should work fine when parsed with kramdown. All places where the kramdown syntax differs from the Markdown syntax are highlighted. Following is the complete syntax definition for all elements kramdown supports. Together with the documentation on the available converters, it is clearly specified what you will get when a kramdown document is converted. ## Source Text Formatting A kramdown document may be in any encoding, for example ASCII, UTF-8 or ISO-8859-1, and the output will have the same encoding as the source. The document consists of two types of elements, block-level elements and span-level elements: * Block-level elements define the main structure of the content, for example, what part of the text should be a paragraph, a list, a blockquote and so on. * Span-level elements mark up small text parts as, for example, emphasized text or a link. Thus span-level elements can only occur inside block-level elements or other span-level elements. You will often find references to the "first column" or "first character" of a line in a block-level element descriptions. Such a reference is always to be taken relative to the current indentation level because some block-level elements open up a new indentation level (e.g. blockquotes). The beginning of a kramdown document opens up the default indentation level which begins at the first column of the text. ### Line Wrapping Some lightweight markup syntax don't work well in environments where lines are hard-wrapped. For example, this is the case with many email programs. Therefore kramdown allows content like paragraphs or blockquotes to be hard-wrapped, i.e. broken across lines. This is sometimes referred to as "lazy syntax" since the indentation or line prefix required for the first line of content is not required for the consecutive lines. Block-level elements that support line wrapping always end when one of the following conditions is met: * a [blank line](#blank-lines), an [EOB marker line](#eob-marker), a [block IAL](#block-ials) or the end of the document (i.e. a [block boundary](#block-boundaries)), * or an [HTML block](#html-blocks). Line wrapping is allowed throughout a kramdown document but there are some block-level elements that do *not* support being hard-wrapped: [headers](#headers) : This is not an issue in most situations since headers normally fit on one line. If a header text gets too long for one line, you need to use HTML syntax instead. [fenced code blocks](#fenced-code-blocks) : The delimiting lines of a fenced code block do not support hard-wrapping. Since everything between the delimiting lines is taken as is, the content of a fenced code block does also not support hard-wrapping. [definition list terms](#definition-lists) : Each definition term has to appear on a separate line. Hard-wrapping would therefore introduce additional definition terms. The definitions themselves, however, do support hard-wrapping. [tables](#tables) : Since each line of a kramdown table describes one table row or a separator, it is not possible to hard-wrap tables. **Note** that it is **NOT** recommended to use lazy syntax to write a kramdown document. The flexibility that the kramdown syntax offers due to the issue of line wrapping hinders readability and should therefore not be used. ### Usage of Tabs kramdown assumes that tab stops are set at multiples of four. This is especially important when using tabs for indentation in lists. Also, tabs may only be used at the beginning of a line when indenting text and must not be preceded by spaces. Otherwise the results may be unexpected. ### Automatic and Manual Escaping Depending on the output format, there are often characters that need special treatment. For example, when converting a kramdown document to HTML one needs to take care of the characters `<`, `>` and `&`. To ease working with these special characters, they are automatically and correctly escaped depending on the output format. This means, for example, that you can just use `<`, `>` and `&` in a kramdown document and need not think about when to use their HTML entity counterparts. However, if you *do use* HTML entities or HTML tags which use one of the characters, the result will be correct nonetheless! Since kramdown also uses some characters to mark-up the text, there needs to be a way to escape these special characters so that they can have their normal meaning. This can be done by using backslash escapes. For example, you can use a literal back tick like this: This \`is not a code\` span! Following is a list of all the characters (character sequences) that can be escaped: \ backslash . period * asterisk _ underscore + plus - minus = equal sign ` back tick ()[]{}<> left and right parens/brackets/braces/angle brackets # hash ! bang << left guillemet >> right guillemet : colon | pipe " double quote ' single quote $ dollar sign ## Block Boundaries Some block-level elements have to start and/or end on so called block boundaries, as stated in their documentation. There are two cases where block boundaries come into play: * If a block-level element has to start on a block boundary, it has to be preceded by either a [blank line](#blank-lines), an [EOB marker](#eob-marker), a [block IAL](#block-ials) or it has to be the first element. * If a block-level element has to end on a block boundary, it has to be followed by either a [blank line](#blank-lines), an [EOB marker](#eob-marker), a [block IAL](#block-ials) or it has to be the last element. # Structural Elements All structural elements are block-level elements and they are used to structure the content. They can mark up some text as, for example, a simple paragraph, a quote or as a list item. ## Blank lines Any line that just contains white space characters such as spaces and tabs is considered a blank line by kramdown. One or more consecutive blank lines are handled as one empty blank line. Blank lines are used to separate block-level elements from each other and in this case they don't have semantic meaning. However, there are some cases where blank lines do have a semantic meaning: * When used in headers -- see the [headers section](#headers) * When used in code blocks -- see the [code blocks section](#code-blocks) * When used in lists -- see the [lists section](#lists) * When used in math blocks -- see the [math blocks section](#math-blocks) * When used for elements that have to start/end on [block boundaries](#block-boundaries) ## Paragraphs Paragraphs are the most used block-level elements. One or more consecutive lines of text are interpreted as one paragraph. The first line of a paragraph may be indented up to three spaces, the other lines can have any amount of indentation because paragraphs support [line wrapping](#line-wrapping). In addition to the rules outlined in the section about line wrapping, a paragraph ends when a [definition list line](#definition-lists) is encountered. You can separate two consecutive paragraphs from each other by using one or more blank lines. Notice that a line break in the source does not mean a line break in the output (due to the [lazy syntax](#line-wrapping))!. If you want to have an explicit line break (i.e. a `
` tag) you need to end a line with two or more spaces or two backslashes! Note, however, that a line break on the last text line of a paragraph is not possible and will be ignored. Leading and trailing spaces will be stripped from the paragraph text. The following gives you an example of how paragraphs look like: This para line starts at the first column. However, the following lines can be indented any number of spaces/tabs. The para continues here. This is another paragraph, not connected to the above one. But with a hard line break. \\ And another one. {: .show-whitespaces .ws-lr} ## Headers kramdown supports so called Setext style and atx style headers. Both forms can be used inside a single document. ### Setext Style Setext style headers have to start on a [block boundary](#block-boundaries) with a line of text (the header text) and a line with only equal signs (for a first level header) or dashes (for a second level header). The header text may be indented up to three spaces but any leading or trailing spaces are stripped from the header text. The amount of equal signs or dashes is not significant, just one is enough but more may look better. The equal signs or dashes have to begin at the first column. For example: First level header ================== Second level header ------ Other first level header = Since Setext headers start on block boundaries, this means in most situations that they have to be preceded by a blank line. However, blank lines are not necessary after a Setext header: This is a normal paragraph. And A Header ------------ And a paragraph > This is a blockquote. And A Header ------------ However, it is generally a good idea to also use a blank line after a Setext header because it looks more appropriate and eases reading of the document. > The original Markdown syntax allows one to omit the blank line before a Setext header. However, > this leads to ambiguities and makes reading the document harder than necessary. Therefore it is > not allowed in a kramdown document. {: .markdown-difference} An edge case worth mentioning is the following: header --- para One might ask if this represents two paragraphs separated by a [horizontal rule](#horizontal-rules) or a second level header and a paragraph. As suggested by the wording in the example, the latter is the case. The general rule is that Setext headers are processed before horizontal rules. ### atx Style atx style headers have to start on a [block boundary](#block-boundaries) with a line that contains one or more hash characters and then the header text. No spaces are allowed before the hash characters. The number of hash characters specifies the heading level: one hash character gives you a first level heading, two a second level heading and so on until the maximum of six hash characters for a sixth level heading. You may optionally use any number of hashes at the end of the line to close the header. Any leading or trailing spaces are stripped from the header text. For example: # First level header ### Third level header ### ## Second level header ###### > Again, the original Markdown syntax allows one to omit the blank line before an atx style header. {: .markdown-difference} ### Specifying a Header ID kramdown supports a nice way for explicitly setting the header ID which is taken from [PHP Markdown Extra] and [Maruku]: If you follow the header text with an opening curly bracket (separated from the text with a least one space), a hash, the ID and a closing curly bracket, the ID is set on the header. If you use the trailing hash feature of atx style headers, the header ID has to go after the trailing hashes. For example: Hello {#id} ----- # Hello {#id} # Hello # {#id} > This additional syntax is not part of standard Markdown. {: .markdown-difference} ## Blockquotes A blockquote is started using the `>` marker followed by an optional space and the content of the blockquote. The marker itself may be indented up to three spaces. All following lines, whether they are started with the blockquote marker or just contain text, belong to the blockquote because blockquotes support [line wrapping](#line-wrapping). The contents of a blockquote are block-level elements. This means that if you are just using text as content that it will be wrapped in a paragraph. For example, the following gives you one blockquote with two paragraphs in it: > This is a blockquote. > on multiple lines that may be lazy. > > This is the second paragraph. Since the contents of a blockquote are block-level elements, you can nest blockquotes and use other block-level elements (this is also the reason why blockquotes need to support line wrapping): > This is a paragraph. > > > A nested blockquote. > > ## Headers work > > * lists too > > and all other block-level elements Note that the first space character after the `>` marker does *not* count when counting spaces for the indentation of the block-level elements inside the blockquote! So [code blocks](#code-blocks) will have to be indented with five spaces or one space and one tab, like this: > A code block: > > ruby -e 'puts :works' [Line wrapping](#line-wrapping) allows one to be lazy but hinders readability and should therefore be avoided, especially with blockquotes. Here is an example of using blockquotes with line wrapping: > This is a paragraph inside a blockquote. > > > This is a nested paragraph that continues here > and here > > and here ## Code Blocks Code blocks can be used to represent verbatim text like markup, HTML or a program fragment because no syntax is parsed within a code block. ### Standard Code Blocks A code block can be started by using four spaces or one tab and then the text of the code block. All following lines containing text, whether they adhere to this syntax or not, belong to the code block because code blocks support [line wrapping](#line-wrapping)). A wrapped code line is automatically appended to the preceding code line by substituting the line break with a space character. The indentation (four spaces or one tab) is stripped from each line of the code block. > The original Markdown syntax does not allow line wrapping in code blocks. {: .markdown-difference} Note that consecutive code blocks that are only separate by [blank lines](#blank-lines) are merged together into one code block: Here comes some code This text belongs to the same code block. If you want to have one code block directly after another one, you need to use an [EOB marker](#eob-marker) to separate the two: Here comes some code ^ This one is separate. ### Fenced Code Blocks > This alternative syntax is not part of the original Markdown syntax. The idea and syntax comes > from the [PHP Markdown Extra] package. {: .markdown-difference} kramdown also supports an alternative syntax for code blocks which does not use indented blocks but delimiting lines. The starting line needs to begin with three or more tilde characters (`~`) and the closing line needs to have at least the number of tildes the starting line has. Everything between is taken literally as with the other syntax but there is no need for indenting the text. For example: ~~~~~~~~ Here comes some code. ~~~~~~~~ If you need lines of tildes in such a code block, just start the code block with more tildes. For example: ~~~~~~~~~~~~ ~~~~~~~ code with tildes ~~~~~~~~ ~~~~~~~~~~~~~~~~~~ This type of code block is especially useful for copy-pasted code since you don't need to indent the code. ### Language of Code Blocks You can tell kramdown the language of a code block by using an [IAL](#inline-attribute-lists): ~~~ def what? 42 end ~~~ {: .language-ruby} The specially named class `language-ruby` tells kramdown that this code block is written in the Ruby language. Such information can be used, for example, by converters to do syntax highlighting on the code block. Fenced code blocks provide an easier way to specify the language, namely by appending the language of the code block to the end of the starting line: ~~~ ruby def what? 42 end ~~~ ## Lists kramdown provides syntax elements for creating ordered and unordered lists as well as definition lists. ### Ordered and Unordered lists Both ordered and unordered lists follow the same rules. A list is started with a list marker (in case of unordered lists one of `+`, `-` or `*` -- you can mix them -- and in case of ordered lists a number followed by a period) followed by one tab or at least one space, optionally followed by an [IAL](#inline-attribute-lists) that should be applied to the list item and then the first part of the content of the list item. The leading tabs or spaces are stripped away from this first line of content to allow for a nice alignment with the following content of a list item (see below). All following list items with the same marker type (unordered or ordered) are put into the same list. The numbers used for ordered lists are irrelevant, an ordered list always starts at 1. The following gives you an unordered list and an ordered list: * kram + down - now 1. kram 2. down 3. now > The original Markdown syntax allows the markers of ordered and unordered lists to be mixed, the > first marker specifying the list type (ordered or unordered). This is not allowed in kramdown. As > stated, the above example will give you two lists (an unordered and an ordered) in kramdown and > only one unordered list in Markdown. {: .markdown-difference} The first list marker in a list may be indented up to three spaces. The column number of the first non-space character which appears after the list item marker on the same line specifies the indentation that has to be used for the following lines of content of the list item. If there is no such character, the indentation that needs to be used is four spaces or one tab. Indented lines may be followed by lines containing text with any amount of indentation due to [line wrapping](#line-wrapping). Note, however, that in addition to the rules outlined in the section about line wrapping, a list item also ends when a line with another list item marker is encountered -- see the next paragraph. The indentation is stripped from the content and the content (note that the content naturally also contains the content of the line with the item marker) is processed as text containing block-level elements. All other list markers in the list may be indented up to three spaces or the number of spaces used for the indentation of the last list item minus one, whichever number is smaller. For example: * This is the first line. Since the first non-space characters appears in column 3, all other indented lines have to be indented 2 spaces. However, one could be lazy and not indent a line but this is not recommended. * This is the another item of the list. It uses a different number of spaces for indentation which is okay but should generally be avoided. * The list item marker is indented 3 spaces which is allowed but should also be avoided and starts the third list item. Note that the lazy line in the second list item may make you believe that this is a sub-list which it isn't! So avoid being lazy! So, while the above is possible and creates one list with three items, it is not advised to use different (marker and list content) indents for same level list items as well as lazy indentation! It is much better to write such a list in the following way: * This is the first list item bla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla bla * This is the another item of the list. bla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla > The original Markdown syntax also allows you to indent the marker, however, the behaviour of what > happens with the list items is not clearly specified and may surprise you. > > Also, Markdown uses a fixed number of spaces/tabs to indent the lines that belong to a list item! {: .markdown-difference} Unordered and ordered lists work the same way in regard to the indentation: * list 1 item 1 * list 1 item 2 (indent 1 space) * list 1 item 3 (indent 2 spaces) * list 1 item 4 (indent 3 spaces) * lazy text belonging to above item 4 ^ 1. list 1 item 1 2. list 1 item 2 (indent 1 space) 3. list 1 item 3 (indent 2 spaces) 4. list 1 item 4 (indent 3 spaces) 5. lazy text belonging to above item 4 ^ * list 1 item 1 * nested list item 1 * nested list item 2 * list 1 item 2 * nested list item 1 ^ 1. list 1 item 1 1. nested list item 1 2. nested list item 2 10. list 1 item 2 1. nested list item 1 ^ 1. text for this list item further text (indent 3 spaces) 10. text for this list item further text (indent 4 spaces) When using tabs for indenting the content of a list item, remember that tab stops occur at multiples of four for kramdown. Tabs are correctly converted to spaces for calculating the indentation. For example: * Using a tab to indent this line, the tab only counts as three spaces and therefore the overall indentation is four spaces. 1. The tab after the marker counts here as three spaces. Since the indentation of the marker is three spaces and the marker itself takes two characters, the overall indentation needed for the following lines is eight spaces or two tabs. It is clear that you might get unexpected results if you mix tabs and spaces or if you don't have the tab stops set to multiples of four in your editor! Therefore this should be avoided! The content of a list item is made up of either text or block-level elements. Simple list items only contain text like in the above examples. They are not even wrapped in a paragraph tag. If the first list text is followed by one or more blank lines, it will be wrapped in a paragraph tag: * kram * down * now In the above example, the first list item text will be wrapped in a paragraph tag since it is followed by a blank line whereas the second list item contains just text. There is obviously a problem for doing this with the last list item when it contains only text. You can circumvent this by leaving a blank line after the last list item and using an EOB marker: * Not wrapped in a paragraph * Wrapped in a paragraph due to the following blank line. * Also wrapped in a paragraph due to the following blank line and the EOB marker. ^ The text of the last list item is also wrapped in a paragraph tag if *all* other list items contain a proper paragraph as first element. This makes the following use case work like expected, i.e. *all* the list items are wrapped in paragraphs: * First list item * Second list item * Last list item > The original Markdown syntax page specifies that list items which are separated by one or more > blank lines are wrapped in paragraph tags. This means that the first text will also be wrapped in > a paragraph if you have block-level elements in a list which are separated by blank lines. The > above rule is easy to remember and lets you exactly specify when the first list text should be > wrapped in a paragraph. The idea for the above rule comes from the [Pandoc] package. {: .markdown-difference} As seen in the examples above, blank lines between list items are allowed. Since the content of a list item can contain block-level elements, you can do the following: * First item A second paragraph * nested list > blockquote * Second item However, there is a problem when you want to have a code block immediately after a list item. You can use an EOB marker to circumvent this problem: * This is a list item. The second para of the list item. ^ A code block following the list item. You can have any block-level element as first element in a list item. However, as described above, the leading tabs or spaces of the line with the list item marker are stripped away. This leads to a problem when you want to have a code block as first element. The solution to this problem is the following construct: * This is a code block (indentation needs to be 4(1)+4(1) spaces (tabs)). {: .show-whitespaces .ws-lr} Note that the list marker needs to be followed with at least one space or tab! Otherwise the line is not recognized as the start of a list item but interpreted as a paragraph containing the list marker. If you want to have one list directly after another one (both with the same list type, i.e. ordered or unordered), you need to use an EOB marker to separate the two: * List one ^ * List two Since paragraphs support [line wrapping](#line-wrapping), it would usually not be possible to create compact nested list, i.e. a list where the text is not wrapped in paragraphs because there is no blank line but a sub list after it: * This is just text. * this is a sub list item * this is a sub sub list item * This is just text, spanning two lines * this is a nested list item. However, this is an often used syntax and is therefore support by kramdown. If you want to start a paragraph with something that looks like a list item marker, you need to escape it. This is done by escaping the period in an ordered list or the list item marker in an unordered list: 1984\. It was great \- others say that, too! As mentioned at the beginning, an optional IAL for applying attributes to a list item can be used after the list item marker: * {:.cls} This item has the class "cls". Here continues the above paragraph. * This is a normal list item. ### Definition Lists > This syntax feature is not part of the original Markdown syntax. The idea and syntax comes from > the [PHP Markdown Extra] package. {: .markdown-difference} Definition lists allow you to assign one or more definitions to one or more terms. A definition list is started when a normal paragraph is followed by a line with a definition marker (a colon which may be optionally indented up to three spaces), then at least one tab or one space, optionally followed by an [IAL](#inline-attribute-lists) that should be applied to the list item and then the first part of the definition. The line with the definition marker may optionally be separated from the preceding paragraph by a blank line. The leading tabs or spaces are stripped away from this first line of the definition to allow for a nice alignment with the following definition content. Each line of the preceding paragraph is taken to be a term and the lines separately parsed as span-level elements. Each such term may optionally start with an [IAL](#inline-attribute-lists) that should be applied to the term. The following is a simple definition list: kramdown : A Markdown-superset converter Maruku : Another Markdown-superset converter The column number of the first non-space character which appears after a definition marker on the same line specifies the indentation that has to be used for the following lines of the definition. If there is no such character, the indentation that needs to be used is four spaces or one tab. Indented lines may be followed by lines containing text with any amount of indentation due to [line wrapping](#line-wrapping). Note, however, that in addition to the rules outlined in the section about line wrapping, a list item also ends when a line with another definition marker is encountered. The indentation is stripped from the definition and it (note that the definition naturally also contains the content of the line with the definition marker) is processed as text containing block level elements. If there is more than one definition, all other definition markers for the term may be indented up to three spaces or the number of spaces used for the indentation of the last definition minus one, whichever number is smaller. For example: definition term 1 definition term 2 : This is the first line. Since the first non-space characters appears in column 3, all other lines have to be indented 2 spaces (or lazy syntax may be used after an indented line). This tells kramdown that the lines belong to the definition. : This is the another definition for the same term. It uses a different number of spaces for indentation which is okay but should generally be avoided. : The definition marker is indented 3 spaces which is allowed but should also be avoided. So, while the above is possible and creates a definition list with two terms and three definitions for them, it is not advised to use different (definition marker and definition) indents in the same definition list as well as lazy indentation! The definition for a term is made up of text and/or block-level elements. If a definition is *not* preceded by a blank line, the first part of the definition will just be text if it would be a paragraph otherwise: definition term : This definition will just be text because it would normally be a paragraph and the there is no preceding blank line. > although the definition contains other block-level elements : This definition *will* be a paragraph since it is preceded by a blank line. The rules about having any block-level element as first element in a list item also apply to a definition. As mentioned at the beginning, an optional IAL for applying attributes to a term or a definition can be used: {:#term} Term with id="term" : {:.cls} Definition with class "cls" {:#term1} First term {:#term2} Second term : {:.cls} Definition ## Tables > This syntax feature is not part of the original Markdown syntax. The syntax is based on the one > from the [PHP Markdown Extra] package. {: .markdown-difference} Sometimes one wants to include simple tabular data in a kramdown document for which using a full-blown HTML table is just too much. kramdown supports this with a simple syntax for ASCII tables. Tables can be created with or without a leading pipe character: If the first line of a table contains a pipe character at the start of the line (optionally indented up to three spaces), then all leading pipe characters (i.e. pipe characters that are only preceded by whitespace) are ignored on all table lines. Otherwise they are not ignored and count when dividing a table line into table cells. There are four different line types that can be used in a table: * *Table rows* define the content of a table. A table row is any line that contains at least one pipe character and is not identified as any other type of table line! The table row is divided into individual table cells by pipe characters. An optional trailing pipe character is ignored. Note that literal pipe characters need to be escaped *except* if they occur in code spans or HTML `` elements! Header rows, footer rows and normal rows are all done using these table rows. Table cells can only contain a single line of text, no multi-line text is supported. The text of a table cell is parsed as span-level elements. Here are some example table rows: | First cell|Second cell|Third cell | First | Second | Third | First | Second | | Fourth | * *Separator lines* are used to split the table body into multiple body parts. A separator line is any line that contains only pipes, dashes, pluses, colons and spaces/tabs and which contains at least one dash and one pipe character. The pipe and plus characters can be used to visually separate columns although this is not needed. Multiple separator lines after another are treated as one separator line. Here are some example separator lines: |----+----| +----|----+ |---------| |- | :-----: | -|- * The first separator line after at least one table row is treated specially, namely as *header separator line*. It is used to demarcate header rows from normal table rows and/or to set column alignments. All table rows above the header separator line are considered to be header rows. The header separator line can be specially formatted to contain column alignment definitions: An alignment definition consists of an optional space/tab followed by an optional colon, one or more dashes, an optional colon and another optional space/tab. The colons of an alignment definition are used to set the alignment of a column: if there are no colons, the column uses the default alignment, if there is a colon only before the dashes, the column is left aligned, if there are colons before and after the dashes, the column is center aligned and if there is only a colon after the dashes, the column is right aligned. Each alignment definition sets the alignment for one column, the first alignment definition for the first column, the second alignment definition for the second column and so on. Here are some example header separator lines with alignment definitions: |---+---+---| + :-: |:------| ---:| | :-: :- -: - :-: | :- * A *footer separator line* is used to demarcate footer rows from normal table rows. All table rows below the footer separator line are considered to be footer rows. A footer separator line is like a normal separator line except that dashes are replaced by equal signs. A footer separator line may only appear once in a table. If multiple footer separator lines are used in one table, only the last is treated as footer separator line, all others are treated as normal separator lines. Normal separator lines that are used after the footer separator line are ignored. Here are some example footer separator lines: |====+====| +====|====+ |=========| |= Trailing spaces or tabs are ignored in all cases. To simplify table creation and maintenance, header, footer and normal separator lines need not specify the same number of columns as table rows; even `|-` and `|=` are a valid separators. Given the above components, a table is specified by * an optional separator line, * optionally followed by zero, one or more table rows followed by a header separator line, * one or more table rows, optionally interspersed with separator lines, * optionally followed by a footer separator line and zero, one or more table rows and * an optional trailing separator line. Also note * that the first line of a table must not have more than three spaces of indentation before the first non-space character, * that each line of a table needs to have at least one not escaped pipe character so that kramdown recognizes it as a line belonging to the table and * that tables have to start and end on [block boundaries](#block-boundaries)! > The table syntax differs from the one used in [PHP Markdown Extra] as follows: > > * kramdown tables do not need to have a table header. > * kramdown tables can be structured using separator lines. > * kramdown tables can contain a table footer. > * kramdown tables need to be separated from other block-level elements. {: .markdown-difference} Here is an example for a kramdown table with a table header row, two table bodies and a table footer row: |-----------------+------------+-----------------+----------------| | Default aligned |Left aligned| Center aligned | Right aligned | |-----------------|:-----------|:---------------:|---------------:| | First body part |Second cell | Third cell | fourth cell | | Second line |foo | **strong** | baz | | Third line |quux | baz | bar | |-----------------+------------+-----------------+----------------| | Second body | | | | | 2 line | | | | |=================+============+=================+================| | Footer row | | | | |-----------------+------------+-----------------+----------------| The above example table is rather time-consuming to create without the help of an ASCII table editor. However, the table syntax is flexible and the above table could also be written like this: |--- | Default aligned | Left aligned | Center aligned | Right aligned |-|:-|:-:|-: | First body part | Second cell | Third cell | fourth cell | Second line |foo | **strong** | baz | Third line |quux | baz | bar |--- | Second body | 2 line |=== | Footer row ## Horizontal Rules A horizontal rule for visually separating content is created by using three or more asterisks, dashes or underscores (these may not be mixed on a line), optionally separated by spaces or tabs, on an otherwise blank line. The first asterisk, dash or underscore may optionally be indented up to three spaces. The following examples show different possibilities to create a horizontal rule: * * * --- _ _ _ _ --------------- ## Math Blocks > This syntax feature is not part of the original Markdown syntax. The idea comes from the [Maruku] > and [Pandoc] packages. {: .markdown-difference} kramdown has built-in support for block and span-level mathematics written in LaTeX. A math block needs to start and end on [block boundaries](#block-boundaries). It is started using two dollar signs, optionally indented up to three spaces. The math block continues until the next two dollar signs (which may be on the same line or on one of the next lines) that appear at the end of a line, i.e. they may only be followed by whitespace characters. The content of a math block has to be valid LaTeX math. It is always wrapped inside a `\begin{displaymath}...\end{displaymath}` enviroment except if it begins with a `\begin` statement. The following kramdown fragment $$ \begin{align*} & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right) = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\ & (x_1, \ldots, x_n) \left( \begin{array}{ccc} \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\ \vdots & \ddots & \vdots \\ \phi(e_n, e_1) & \cdots & \phi(e_n, e_n) \end{array} \right) \left( \begin{array}{c} y_1 \\ \vdots \\ y_n \end{array} \right) \end{align*} $$ renders (using Javascript library [MathJax](http://www.mathjax.org/)) as $$ \begin{align*} & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right) = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\ & (x_1, \ldots, x_n) \left( \begin{array}{ccc} \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\ \vdots & \ddots & \vdots \\ \phi(e_n, e_1) & \cdots & \phi(e_n, e_n) \end{array} \right) \left( \begin{array}{c} y_1 \\ \vdots \\ y_n \end{array} \right) \end{align*} $$ Using inline math is also easy: just surround your math content with two dollar signs, like with a math block. If you don't want to start an inline math statement, just escape the dollar signs and they will be treated as simple dollar signs. > **Note** that LaTeX code that uses the pipe symbol `|` in inline math statements may lead to a > line being recognized as a table line. This problem can be avoided by using the `\vert` command > instead of `|`! {:.information} If you have a paragraph that looks like a math block but should actually be a paragraph with just an inline math statement, you need to escape the first dollar sign: The following is a math block: $$ 5 + 5 $$ But next comes a paragraph with an inline math statement: \$$ 5 + 5 $$ If you don't even want the inline math statement, escape the first two dollar signs: \$\$ 5 + 5 $$ ## HTML Blocks > The original Markdown syntax specifies that an HTML block must start at the left margin, i.e. no > indentation is allowed. Also, the HTML block has to be surrounded by blank lines. Both > restrictions are lifted for kramdown documents. Additionally, the original syntax does not allow > you to use Markdown syntax in HTML blocks which is allowed with kramdown. {: .markdown-difference} An HTML block is potentially started if a line is encountered that begins with a non-span-level HTML tag or a general XML tag (opening or closing) which may be indented up to three spaces. The following HTML tags count as span-level HTML tags and *won't* start an HTML block if found at the beginning of an HTML block line: a abbr acronym b big bdo br button cite code del dfn em i img input ins kbd label option q rb rbc rp rt rtc ruby samp select small span strong sub sup textarea tt var Further parsing of a found start tag depends on the tag and in which of three possible ways its content is parsed: * Parse as raw HTML block: If the HTML/XML tag content should be handled as raw HTML, then only HTML/XML tags are parsed from this point onwards and text is handled as raw, unparsed text until the matching end tag is found or until the end of the document. Each found tag will be parsed as raw HTML again. However, if a tag has a `markdown` attribute, this attribute controls parsing of this one tag (see below). Note that the parser basically supports only correct XHTML! However, there are some exceptions. For example, attributes without values (i.e. boolean attributes) are also supported and elements without content like `
` can be written as `
`. If an invalid closing tag is found, it is ignored. * Parse as block-level elements: If the HTML/XML tag content should be parsed as text containing block-level elements, the remaining text on the line will be parsed by the block-level parser as if it appears on a separate line (**Caution**: This also means that if the line consists of the start tag, text and the end tag, the end tag will not be found!). All following lines are parsed as block-level elements until an HTML block line with the matching end tag is found or until the end of the document. * Parse as span-level elements: If the HTML/XML tag content should be parsed as text containing span level elements, then all text until the *next* matching end tag or until the end of the document will be the content of the tag and will later be parsed by the span-level parser. This also means that if the matching end tag is inside what appears to be a code span, it is still used! If there is text after an end tag, it will be parsed as if it appears on a separate line except when inside a raw HTML block. Also, if an invalid closing tag is found, it is ignored. Note that all HTML tag and attribute names are converted to lowercase! By default, kramdown parses all block HTML tags and all XML tags as raw HTML blocks. However, this can be configured with the `parse_block_html`. If this is set to `true`, then syntax parsing in HTML blocks is globally enabled. It is also possible to enable/disable syntax parsing on a tag per tag basis using the `markdown` attribute: * If an HTML tag has an attribute `markdown="0"`, then the tag is parsed as raw HTML block. * If an HTML tag has an attribute `markdown="1"`, then the default mechanism for parsing syntax in this tag is used. * If an HTML tag has an attribute `markdown="block"`, then the content of the tag is parsed as block level elements. * If an HTML tag has an attribute `markdown="span"`, then the content of the tag is parsed as span level elements. The following list shows which HTML tags are parsed in which mode by default when `markdown="1"` is applied or `parse_block_html` is `true`: Parse as raw HTML : script style math option textarea pre code kbd samp var Also, all general XML tags are parsed as raw HTML blocks. Parse as block-level elements : applet button blockquote body colgroup dd div dl fieldset form iframe li map noscript object ol table tbody thead tfoot tr td ul Parse as span-level elements : a abbr acronym address b bdo big cite caption code del dfn dt em h1 h2 h3 h4 h5 h6 i ins kbd label legend optgroup p pre q rb rbc rp rt rtc ruby samp select small span strong sub sup th tt var > Remember that all span-level HTML tags like `a` or `b` do not start a HTML block! However, the > above lists also include span-level HTML tags in the case the `markdown` attribute is used on a > tag inside a raw HTML block. Here is a simple example input and its HTML output with `parse_block_html` set to `false`: This is a para.
Something in here.
Other para. ^

This is a para.

Something in here.

Other para.

As one can see the content of the `div` tag will be parsed as raw HTML block and left alone. However, if the `markdown="1"` attribute was used on the `div` tag, the content would be parsed as block-level elements and therefore converted to a paragraph. You can also use several HTML tags at once:
This is some text in the `layer1` div.
This is some text in the `layers` div.
This is a para outside the HTML block. However, remember that if the content of a tag is parsed as block-level elements, the content that appears after a start/end tag but on the same line, is processed as if it appears on a new line:
This is the first part of a para, which is continued here.

This works without problems because it is parsed as span-level elements

The end tag is not found because this line is parsed as a paragraph
Since setting `parse_block_html` to `true` can lead to some not wanted behaviour, it is generally better to selectively enable or disable block/span-level elements parsing by using the `markdown` attribute! Unclosed block-level HTML tags are correctly closed at the end of the document to ensure correct nesting and invalidly used end tags are removed from the output: This is a para.
Another para.

^

This is a para.

Another para.

The parsing of processing instructions and XML comments is also supported. The content of both, PIs and XML comments, may span multiple lines. The start of a PI/XML comment may only appear at the beginning of a line, optionally indented up to three spaces. If there is text after the end of a PI or XML comment, it will be parsed as if it appears on a separate line. kramdown syntax in PIs/XML comments is not processed: This is a para. First part of para, continues here. # Text Markup These elements are all span-level elements and used inside block-level elements to markup text fragments. For example, one can easily create links or apply emphasis to certain text parts. Note that empty span-level elements are not converted to empty HTML tags but are copied as-is to the output. ## Links and Images Three types of links are supported: automatic links, inline links and reference links. ### Automatic Links This is the easiest one to create: Just surround a web address or an email address with angle brackets and the address will be turned into a proper link. The address will be used as link target and as link text. For example: Information can be found on the homepage. You can also mail me: It is not possible to specify a different link text using automatic links -- use the other link types for this! ### Inline Links As the wording suggests, inline links provide all information inline in the text flow. Reference style links only provide the link text in the text flow and everything else is defined elsewhere. This also allows you to reuse link definitions. An inline style link can be created by surrounding the link text with square brackets, followed immediately by the link URL (and an optional title in single or double quotes preceded by at least one space) in normal parentheses. For example: This is [a link](http://rubyforge.org) to a page. A [link](../test "local URI") can also have a title. And [spaces](link with spaces.html)! Notes: * The link text is treated like normal span-level text and therefore is parsed and converted. However, if you use square brackets within the link text, you have to either properly nest them or to escape them. It is not possible to create nested links! The link text may also be omitted, e.g. for creating link anchors. * The link URL has to contain properly nested parentheses if no title is specified, or the link URL must be contained in angle brackets (incorrectly nested parentheses are allowed). * The link title may not contain its delimiters and may not be empty. * Additional link attributes can be added by using a [span IAL](#span-ials) after the inline link, for example: This is a [link](http://example.com){:hreflang="de"} ### Reference Links To create a reference style link, you need to surround the link text with square brackets (as with inline links), followed by optional spaces/tabs/line breaks and then optionally followed with another set of square brackets with the link identifier in them. A link identifier may not contain a closing bracket and, when specified in a link definition, newline characters; it is also not case sensitive, line breaks and tabs are converted to spaces and multiple spaces are compressed into one. For example: This is a [reference style link][linkid] to a page. And [this] [linkid] is also a link. As is [this][] and [THIS]. If you don't specify a link identifier (i.e. only use empty square brackets) or completely omit the second pair of square brackets, the link text is converted to a valid link identifier by removing all invalid characters and inserting spaces for line breaks. If there is a link definition found for the link identifier, a link will be created. Otherwise the text is not converted to a link. As with inline links, additional link attributes can be added by using a [span IAL](#span-ials) after the reference link. ### Link Definitions The link definition can be put anywhere in the document. It does not appear in the output. A link definition looks like this: [linkid]: http://www.example.com/ "Optional Title" > Link definitions are, despite being described here, non-content block-level elements. {: .information} The link definition has the following structure: * The link identifier in square brackets, optionally indented up to three spaces, * then a colon and one or more optional spaces/tabs, * then the link URL which must contain at least one non-space character, or a left angle bracket, the link URL and a right angle bracket, * then optionally the title in single or double quotes, separated from the link URL by one or more spaces or on the next line by itself indented any number of spaces/tabs. > The original Markdown syntax also allowed the title to be specified in parenthesis. This is not > allowed for consistency with the inline title. {: .markdown-difference} If you have some text that looks like a link definition but should really be a link and some text, you can escape the colon after the link identifier: The next paragraph contains a link and some text. [Room 100]\: There you should find everything you need! [Room 100]: link_to_room_100.html Although link definitions are non-content block-level elements, [block IALs](#block-ials) can be used on them to specify additional attributes for the links: [linkid]: http://example.com {:hreflang="de"} ### Images Images can be specified via a syntax that is similar to the one used by links. The difference is that you have to use an exclamation mark before the first square bracket and that the link text of a normal link becomes the alternative text of the image link. As with normal links, image links can be written inline or reference style. For example: Here comes a ![smiley](../images/smiley.png)! And here ![too](../images/other.png 'Title text'). Or ![here]. With empty alt text ![](see.jpg) The link definition for images is exactly the same as the link definition for normal links. Since additional attributes can be added via span and block IALs, it is possible, for example, to specify image width and height: Here is an inline ![smiley](smiley.png){:height="36px" width="36px"}. And here is a referenced ![smile] [smile]: smile.png {: height="36px" width="36px"} ## Emphasis kramdown supports two types of emphasis: light and strong emphasis. Text parts that are surrounded with single asterisks `*` or underscores `_` are treated as text with light emphasis, text parts surrounded with two asterisks or underscores are treated as text with strong emphasis. Surrounded means that the starting delimiter must not be followed by a space and that the stopping delimiter must not be preceded by a space. Here is an example for text with light and strong emphasis: *some text* _some text_ **some text** __some text__ The asterisk form is also allowed within a single word: This is un*believe*able! This d_oe_s not work! Text can be marked up with both light and strong emphasis, possibly using different delimiters. However, it is not possible to nest strong within strong or light within light emphasized text: This is a ***text with light and strong emphasis***. This **is _emphasized_ as well**. This *does _not_ work*. This **does __not__ work either**. If one or two asterisks or underscores are surrounded by spaces, they are treated literally. If you want to force the literal meaning of an asterisk or an underscore you can backslash-escape it: This is a * literal asterisk. These are ** two literal asterisk. As \*are\* these! ## Code Spans This is the span-level equivalent of the [code block](#code-blocks) element. You can markup a text part as code span by surrounding it with backticks `` ` ``. For example: Use `` tags for this. Note that all special characters in a code span are treated correctly. For example, when a code span is converted to HTML, the characters `<`, `>` and `&` are substituted by their respective HTML counterparts. To include a literal backtick in a code span, you need to use two or more backticks as delimiters. You can insert one optional space after the starting and before the ending delimiter (these spaces are not used in the output). For example: Here is a literal `` ` `` backtick. And here is `` `some` `` text (note the two spaces so that one is left in the output!). A single backtick surrounded by spaces is treated as literal backtick. If you want to force the literal meaning of a backtick you can backslash-escape it: This is a ` literal backtick. As \`are\` these! As with [code blocks](#language-of-code-blocks) you can set the language of a code span by using an [IAL](#inline-attribute-lists): This is a Ruby code fragment `x = Class.new`{:.language-ruby} ## HTML Spans HTML tags cannot only be used on the block-level but also on the span-level. Span-level HTML tags can only be used inside one block-level element, it is not possible to use a start tag in one block level element and the end tag in another. Note that only correct XHTML is supported! This means that you have to use, for example, `
` instead of `
` (although kramdown tries to fix such errors if possible). By default, kramdown parses kramdown syntax inside span HTML tags. However, this behaviour can be configured with the `parse_span_html` option. If this is set to `true`, then syntax parsing in HTML spans is enabled, if it is set to `false`, parsing is disabled. It is also possible to enable/disable syntax parsing on a tag per tag basis using the `markdown` attribute: * If an HTML tag has an attribute `markdown="0"`, then no parsing (except parsing of HTML span tags) is done inside that HTML tag. * If an HTML tag has an attribute `markdown="1"`, then the content of the tag is parsed as span level elements. * If an HTML tag has an attribute `markdown="block"`, then a warning is issued because HTML spans cannot contain block-level elements and the attribute is ignored. * If an HTML tag has an attribute `markdown="span"`, then the content of the tag is parsed as span level elements. The content of a span-level HTML tag is normally parsed as span-level elements. Note, however, that some tags like ` kramdown-1.15.0/test/testcases_gfm/header_ids_with_prefix.html0000644000004100000410000000010313164166452024645 0ustar www-datawww-data

Header 1

123

kramdown-1.15.0/test/testcases_gfm/backticks_syntax.html0000644000004100000410000000103413164166452023516 0ustar www-datawww-data
Three backticks
Four backticks
Unbalanced bottom heavy
1language no space
1language with space
kramdown-1.15.0/test/testcases_gfm/strikethrough.html0000644000004100000410000000121213164166452023052 0ustar www-datawww-data

This is a test

~This is another test~

This is yet another test~

~~ This is a test of it NOT working ~~

~~
This
is
a
multiline
test
~~

This is an inline strikethrough test

This is an ~~escaped~~ strikethrough.

This is a strikethrough with a ~ in the middle

I don’t even~ have an extra tilde.

This should ~~not be struck.

This is a complex strike through *test ~~with nesting involved* here~~.

kramdown-1.15.0/test/testcases_gfm/hard_line_breaks_off.html0000644000004100000410000000012413164166452024257 0ustar www-datawww-data

This is just a normal paragraph.
Containing a manual line break above.

kramdown-1.15.0/test/testcases_gfm/backticks_syntax.text0000644000004100000410000000023313164166452023536 0ustar www-datawww-data``` Three backticks ``` ```` Four backticks ```` ``` Unbalanced bottom heavy `````` ````ruby language no space ```` ```` ruby language with space ```` kramdown-1.15.0/test/testcases_gfm/strikethrough.text0000644000004100000410000000067313164166452023104 0ustar www-datawww-data~~This is a test~~ ~~~This is another test~~~ ~~This is yet another test~~~ ~~ This is a test of it NOT working ~~ ~~ This is a **multiline** test ~~ This is an ~~_inline_ **strikethrough**~~ test This is an \~~escaped~~ strikethrough. This is a ~~strikethrough with a ~ in the middle~~ I ~~don't even~~~ have an extra tilde. This should ~~not be struck. This ~~is a complex *strike* through *test ~~with nesting~~ involved* here~~. kramdown-1.15.0/test/testcases_gfm/hard_line_breaks.text0000644000004100000410000000002013164166452023440 0ustar www-datawww-dataone _two_ three kramdown-1.15.0/test/testcases_gfm/paragraph_end-disabled.text0000644000004100000410000000030313164166452024530 0ustar www-datawww-dataA - b This is a list - or is it blockquote > text header # text codeblock fenced ``` puts hello world ``` * level 1 some text begin level 2 * level 2 * level 2 # h1 ## h2 ### h3 kramdown-1.15.0/test/testcases_gfm/paragraph_end-disabled.html0000644000004100000410000000054213164166452024515 0ustar www-datawww-data

A
- b

This is a list
- or is it

blockquote
> text

header
# text

codeblock fenced
puts hello world

  • level 1
    some text

    begin level 2
    * level 2
    * level 2

h1

## h2
### h3

kramdown-1.15.0/test/testcases_gfm/header_ids.options0000644000004100000410000000002013164166452022762 0ustar www-datawww-data:auto_ids: true kramdown-1.15.0/test/testcases_gfm/backticks_disable_highlighting.text0000644000004100000410000000007213164166452026341 0ustar www-datawww-data```ruby Kramdown::Document.new(text, :input => 'GFM') ``` kramdown-1.15.0/test/testcases_gfm/header_ids.html0000644000004100000410000000122613164166452022244 0ustar www-datawww-data

test

variable_name

abc def öúß

192 abc 192

;.;;

variable_name

variable_name

;;

before after tab

with code

with  ä space

With “smart” quotes

with — « typographic » … symbols

with

kramdown-1.15.0/test/testcases_gfm/header_ids_with_prefix.options0000644000004100000410000000005013164166452025375 0ustar www-datawww-data:auto_ids: true :auto_id_prefix: hallo- kramdown-1.15.0/test/testcases_gfm/paragraph_end.html0000644000004100000410000000066113164166452022752 0ustar www-datawww-data

A

  • b

This is a list

  • or is it

blockquote

text

header

text

codeblock fenced

puts hello world
  • level 1
    some text

    begin level 2

    • level 2
    • level 2

h1

h2

h3

kramdown-1.15.0/test/testcases_gfm/paragraph_end.text0000644000004100000410000000030313164166452022763 0ustar www-datawww-dataA - b This is a list - or is it blockquote > text header # text codeblock fenced ``` puts hello world ``` * level 1 some text begin level 2 * level 2 * level 2 # h1 ## h2 ### h3 kramdown-1.15.0/test/testcases_gfm/hard_line_breaks_off.text0000644000004100000410000000011113164166452024273 0ustar www-datawww-dataThis is just a normal paragraph. Containing a manual line break above. kramdown-1.15.0/test/testcases_gfm/codeblock_fenced.options0000644000004100000410000000002713164166452024133 0ustar www-datawww-data:enable_coderay: false kramdown-1.15.0/test/testcases_gfm/hard_line_breaks.html0000644000004100000410000000005213164166452023425 0ustar www-datawww-data

one
two
three

kramdown-1.15.0/test/testcases_gfm/header_ids.text0000644000004100000410000000044213164166452022263 0ustar www-datawww-data### test {#myid} ### variable_name ### abc def öúß ### 192 abc 192 ### ;.;; ### variable_name ### variable_name ### ;; ### before after tab ### with `code` ### with  ä space ### With "smart" quotes ### with --- << typographic >> ... symbols ### with $$m=5$$ kramdown-1.15.0/test/testcases_gfm/paragraph_end-disabled.options0000644000004100000410000000002013164166452025233 0ustar www-datawww-data:gfm_quirks: [] kramdown-1.15.0/test/testcases_gfm/two_para_hard_line_breaks.html0000644000004100000410000000014413164166452025323 0ustar www-datawww-data

This is just a normal paragraph.
Containing a line break.

Another paragraph.

kramdown-1.15.0/test/testcases_gfm/backticks_disable_highlighting.options0000644000004100000410000000002713164166452027050 0ustar www-datawww-data:enable_coderay: false kramdown-1.15.0/test/testcases_gfm/codeblock_fenced.text0000644000004100000410000000034513164166452023427 0ustar www-datawww-datanormal ```ruby require 'kramdown' Kramdown::Document.new(text).to_html ``` indent with tab ```ruby require 'kramdown' Kramdown::Document.new(text).to_html ``` indent with 2 spaces ```js console.log("hello"); ``` kramdown-1.15.0/test/testcases_gfm/atx_header.text0000644000004100000410000000002513164166452022275 0ustar www-datawww-data# header #no header kramdown-1.15.0/test/testcases_gfm/backticks_disable_highlighting.html0000644000004100000410000000014013164166452026315 0ustar www-datawww-data
Kramdown::Document.new(text, :input => 'GFM')
kramdown-1.15.0/test/testcases_gfm/two_para_hard_line_breaks.text0000644000004100000410000000012013164166452025335 0ustar www-datawww-dataThis is just a normal paragraph. Containing a line break. Another paragraph. kramdown-1.15.0/test/testcases_gfm/header_ids_with_prefix.text0000644000004100000410000000002213164166452024665 0ustar www-datawww-data# Header 1 # 123 kramdown-1.15.0/test/testcases_gfm/atx_header.html0000644000004100000410000000004313164166452022255 0ustar www-datawww-data

header

#no header

kramdown-1.15.0/test/test_string_scanner_kramdown.rb0000644000004100000410000000145113164166452022745 0ustar www-datawww-data# -*- coding: utf-8 -*- # #-- # Copyright (C) 2009-2016 Thomas Leitner # # This file is part of kramdown which is licensed under the MIT. #++ # require 'minitest/autorun' require 'kramdown/utils/string_scanner' describe Kramdown::Utils::StringScanner do [ ["...........X............", [/X/], 1], ["1\n2\n3\n4\n5\n6X", [/X/], 6], ["1\n2\n3\n4\n5\n6X\n7\n8X", [/X/,/X/], 8], [(".\n" * 1000) + 'X', [/X/], 1001] ].each_with_index do |test_data, i| test_string, scan_regexes, expect = test_data it "computes the correct current_line_number for example ##{i+1}" do str_sc = Kramdown::Utils::StringScanner.new(test_string) scan_regexes.each { |scan_re| str_sc.scan_until(scan_re) } str_sc.current_line_number.must_equal expect end end end kramdown-1.15.0/test/test_location.rb0000644000004100000410000001532113164166452017635 0ustar www-datawww-data# -*- coding: utf-8 -*- # #-- # Copyright (C) 2009-2016 Thomas Leitner # # This file is part of kramdown which is licensed under the MIT. #++ # require 'minitest/autorun' require 'kramdown' Encoding.default_external = 'utf-8' if RUBY_VERSION >= '1.9' describe 'location' do # checks that +element+'s :location option corresponds to the location stored # in the element.attr['class'] def check_element_for_location(element) if (match = /^line-(\d+)/.match(element.attr['class'] || '')) expected_line = match[1].to_i element.options[:location].must_equal(expected_line) end element.children.each do |child| check_element_for_location(child) end end # Test cases consist of a kramdown string that uses IALs to specify the expected # line numbers for a given element. test_cases = { 'autolink' => %(testing autolinks\n\n{:.line-3}), 'blockquote' => %( > block quote1 > > * {:.line-3} list item in block quote > * {:.line-4} list item in block quote > {:.line-3} {:.line-1} > block quote2 {:.line-8} ), 'codeblock' => %(\na para\n\n~~~~\ntest code 1\n~~~~\n{:.line-3}\n\n test code 2\n{:.line-8}\n), 'codespan' => %(a para\n\nanother para ``{:.line-3} with code\n), 'emphasis' => %( para *span*{:.line-1} {:.line-1} ## header *span*{:.line-4} {:.line-4} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum *short span on single line*{:.line-11} dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non *long span over multiple lines - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.*{:.line-13} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo `code span`{:.line-18} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo {:.line-7} ), 'header' => %( # header1 {:.line-1} ## header2 {:.line-4} ## header3 {:.line-7} header4 ======= {:.line-10} ^ header5 ------- {:.line-16} ), 'horizontal_rule' => %(\na para\n\n----\n{:.line-3}\n), 'html_entity' => "a para\n\nanother para with &{:.line-3} html entity.\n", 'link' => %( a para This is [a link](http://rubyforge.org){:.line-3} to a page. Here comes a ![smiley](../images/smiley.png){:.line-5} ), 'list' => %( * {:.line-1} list item * {:.line-2} list item * {:.line-3} list item {:.line-1} {:.line-7} 1. {:.line-7} list item 2. {:.line-8} list item 3. {:.line-9} list item {:.line-12} definition term 1 : {:.line-13} definition definition 1 definition term 2 : {:.line-15} definition definition 2 ), 'math_block' => %(\na para\n\n$$5+5$$\n{:.line-3}\n), 'math_inline' => %(\na para\n\nanother para with inline math $$5+5$${:.line-3}\n), 'paragraph' => %( para1 {:.line-1} para2 {:.line-4} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse {:.line-7} {:.line-14} para with leading IAL ), 'table' => %( a para |first|second|third| |-----|------|-----| |a |b |c | {:.line-3} ), 'typographic_symbol' => %( a para another para ---{:.line-3} another para ...{:.line-5} ), 'gh issue 129' => %( `|` {:.line-1} ), 'gh issue 131' => %( * {:.line-1} test line 2 * {:.line-3} second * {:.line-4} third * {:.line-5} * {:.line-5} one * {:.line-6} two ), 'gh issue 158' => %( 😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁 {:.line-1} - {:.line-4} T {:.line-4} # T {:.line-7} ), 'gh issue 243 - HTML raw elements' => %(
  • Test
), } test_cases.each do |name, test_string| it "Handles #{ name }" do doc = Kramdown::Document.new(test_string.gsub(/^ /, '').strip) check_element_for_location(doc.root) end end it 'adds location info to duplicate abbreviation definition warnings' do test_string = %(This snippet contains a duplicate abbreviation definition *[duplicate]: The first definition *[duplicate]: The second definition ) doc = Kramdown::Document.new(test_string.strip) doc.warnings.must_equal ["Duplicate abbreviation ID 'duplicate' on line 4 - overwriting"] end it 'handles abbreviations' do str = "This *is* ABC and\n**and** ABC second\nanother ABC\nas ABC as\nABC at the end.\n\n*[ABC]: ABC" doc = Kramdown::Document.new(str) doc.root.children.first.children.select {|e| e.type == :abbreviation}.each_with_index do |e, i| assert_equal(i + 1, e.options[:location]) end end it 'handles line breaks' do str = "First \nsecond\\\\\nthird \n" doc = Kramdown::Document.new(str) doc.root.children.first.children.select {|e| e.type == :br}.each_with_index do |e, i| assert_equal(i + 1, e.options[:location]) end end it 'handles smart quotes' do str = "This is 'first'\nand 'second' and\n'third'" doc = Kramdown::Document.new(str) doc.root.children.first.children.select {|e| e.type == :smart_quote}.each_with_index do |e, i| assert_equal(((i + 1) /2.0).ceil, e.options[:location]) end end it 'handles hard wrapped paragraphs with the GFM parser' do str = "A*b*C\nA*b*C\nA*b*C" doc = Kramdown::Document.new(str, :input => 'GFM', :hard_wrap => true) para = doc.root.children.first 1.upto(3) do |line| 0.upto(line == 3 ? 2 : 3) do |element| assert_equal(line, para.children[4*(line - 1) + element].options[:location]) end end end end kramdown-1.15.0/test/test_files.rb0000644000004100000410000006363113164166452017136 0ustar www-datawww-data# -*- coding: utf-8 -*- # #-- # Copyright (C) 2009-2016 Thomas Leitner # # This file is part of kramdown which is licensed under the MIT. #++ # require 'minitest/autorun' require 'kramdown' require 'yaml' require 'tmpdir' begin require 'kramdown/converter/syntax_highlighter/rouge' class Kramdown::Converter::SyntaxHighlighter::Rouge::FORMATTER_CLASS def format(tokens, &b) super.sub(/<\/code><\/pre>\n?/, "
\n") end end # custom formatter for tests class RougeHTMLFormatters < Kramdown::Converter::SyntaxHighlighter::Rouge::FORMATTER_CLASS tag 'rouge_html_formatters' def stream(tokens, &b) yield %(
) super yield %(
) end end rescue LoadError, SyntaxError, NameError end Encoding.default_external = 'utf-8' if RUBY_VERSION >= '1.9' class TestFiles < Minitest::Test EXCLUDE_KD_FILES = [('test/testcases/block/04_header/with_auto_ids.text' if RUBY_VERSION <= '1.8.6'), # bc of dep stringex not working ('test/testcases/span/03_codespan/rouge/' if RUBY_VERSION < '2.0'), #bc of rouge ('test/testcases/block/06_codeblock/rouge/' if RUBY_VERSION < '2.0'), #bc of rouge ('test/testcases/block/15_math/itex2mml.text' if RUBY_PLATFORM == 'java'), # bc of itextomml ('test/testcases/span/math/itex2mml.text' if RUBY_PLATFORM == 'java'), # bc of itextomml ].compact # Generate test methods for kramdown-to-xxx conversion Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file| next if EXCLUDE_KD_FILES.any? {|f| text_file =~ /#{f}/} basename = text_file.sub(/\.text$/, '') opts_file = text_file.sub(/\.text$/, '.options') (Dir[basename + ".*"] - [text_file, opts_file]).each do |output_file| next if (RUBY_VERSION >= '1.9' && File.exist?(output_file + '.19')) || (RUBY_VERSION < '1.9' && output_file =~ /\.19$/) output_format = File.extname(output_file.sub(/\.19$/, ''))[1..-1] next if !Kramdown::Converter.const_defined?(output_format[0..0].upcase + output_format[1..-1]) define_method('test_' + text_file.tr('.', '_') + "_to_#{output_format}") do opts_file = File.join(File.dirname(text_file), 'options') if !File.exist?(opts_file) options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1} doc = Kramdown::Document.new(File.read(text_file), options) assert_equal(File.read(output_file), doc.send("to_#{output_format}")) end end end # Generate test methods for html-to-{html,kramdown} conversion `tidy -v 2>&1` if $?.exitstatus != 0 warn("Skipping html-to-{html,kramdown} tests because tidy executable is missing") else EXCLUDE_HTML_FILES = ['test/testcases/block/06_codeblock/whitespace.html', # bc of span inside pre 'test/testcases/block/09_html/simple.html', # bc of xml elements 'test/testcases/span/03_codespan/highlighting.html', # bc of span elements inside code element 'test/testcases/block/04_header/with_auto_ids.html', # bc of auto_ids=true option 'test/testcases/block/04_header/header_type_offset.html', # bc of header_offset option 'test/testcases/block/06_codeblock/rouge/simple.html', # bc of double surrounding
'test/testcases/block/06_codeblock/rouge/multiple.html', # bc of double surrounding
('test/testcases/span/03_codespan/rouge/simple.html' if RUBY_VERSION < '2.0'), ('test/testcases/span/03_codespan/rouge/disabled.html' if RUBY_VERSION < '2.0'), 'test/testcases/block/15_math/ritex.html', # bc of tidy 'test/testcases/span/math/ritex.html', # bc of tidy 'test/testcases/block/15_math/itex2mml.html', # bc of tidy 'test/testcases/span/math/itex2mml.html', # bc of tidy 'test/testcases/block/15_math/mathjaxnode.html', # bc of tidy 'test/testcases/block/15_math/mathjaxnode_notexhints.html', # bc of tidy 'test/testcases/block/15_math/mathjaxnode_semantics.html', # bc of tidy 'test/testcases/span/math/mathjaxnode.html', # bc of tidy 'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax preview 'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of mathjax preview 'test/testcases/block/15_math/mathjax_preview_as_code.html', # bc of mathjax preview 'test/testcases/span/05_html/mark_element.html', # bc of tidy 'test/testcases/block/09_html/xml.html', # bc of tidy 'test/testcases/span/05_html/xml.html', # bc of tidy ].compact EXCLUDE_HTML_TEXT_FILES = ['test/testcases/block/09_html/parse_as_span.htmlinput', 'test/testcases/block/09_html/parse_as_raw.htmlinput', ].compact Dir[File.dirname(__FILE__) + '/testcases/**/*.{html,html.19,htmlinput,htmlinput.19}'].each do |html_file| next if EXCLUDE_HTML_FILES.any? {|f| html_file =~ /#{f}(\.19)?$/} next if (RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19')) || (RUBY_VERSION < '1.9' && html_file =~ /\.19$/) out_files = [] out_files << [(html_file =~ /\.htmlinput(\.19)?$/ ? html_file.sub(/input(\.19)?$/, '') : html_file), :to_html] if html_file =~ /\.htmlinput(\.19)?$/ && !EXCLUDE_HTML_TEXT_FILES.any? {|f| html_file =~ /#{f}/} out_files << [html_file.sub(/htmlinput(\.19)?$/, 'text'), :to_kramdown] end out_files.select {|f, _| File.exist?(f)}.each do |out_file, out_method| define_method('test_' + html_file.tr('.', '_') + "_to_#{File.extname(out_file)}") do opts_file = html_file.sub(/\.html(input)?(\.19)?$/, '.options') opts_file = File.join(File.dirname(html_file), 'options') if !File.exist?(opts_file) options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1} doc = Kramdown::Document.new(File.read(html_file), options.merge(:input => 'html')) if out_method == :to_html assert_equal(tidy_output(File.read(out_file)), tidy_output(doc.send(out_method))) else assert_equal(File.read(out_file), doc.send(out_method)) end end end end end def tidy_output(out) cmd = "tidy -q --doctype omit #{RUBY_VERSION >= '1.9' ? '-utf8' : '-raw'} 2>/dev/null" result = IO.popen(cmd, 'r+') do |io| io.write(out) io.close_write io.read end if $?.exitstatus == 2 raise "Problem using tidy" end result end # Generate test methods for text-to-latex conversion and compilation `latex -v 2>&1` if $?.exitstatus != 0 warn("Skipping latex compilation tests because latex executable is missing") else EXCLUDE_LATEX_FILES = ['test/testcases/span/01_link/image_in_a.text', # bc of image link 'test/testcases/span/01_link/imagelinks.text', # bc of image links 'test/testcases/span/01_link/empty_title.text', 'test/testcases/span/04_footnote/markers.text', # bc of footnote in header 'test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.text', 'test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.text', ].compact Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file| next if EXCLUDE_LATEX_FILES.any? {|f| text_file =~ /#{f}$/} define_method('test_' + text_file.tr('.', '_') + "_to_latex_compilation") do latex = Kramdown::Document.new(File.read(text_file), :auto_ids => false, :footnote_nr => 1, :template => 'document').to_latex Dir.mktmpdir do |tmpdir| result = IO.popen("latex -output-directory='#{tmpdir}' 2>/dev/null", 'r+') do |io| io.write(latex) io.close_write io.read end assert($?.exitstatus == 0, result.scan(/^!(.*\n.*)/).join("\n")) end end end end # Generate test methods for text->kramdown->html conversion `tidy -v 2>&1` if $?.exitstatus != 0 warn("Skipping text->kramdown->html tests because tidy executable is missing") else EXCLUDE_TEXT_FILES = ['test/testcases/span/05_html/markdown_attr.text', # bc of markdown attr 'test/testcases/block/09_html/markdown_attr.text', # bc of markdown attr 'test/testcases/span/extension/options.text', # bc of parse_span_html option 'test/testcases/block/12_extension/options.text', # bc of options option 'test/testcases/block/12_extension/options3.text', # bc of options option 'test/testcases/block/09_html/content_model/tables.text', # bc of parse_block_html option 'test/testcases/block/09_html/html_to_native/header.text', # bc of auto_ids option that interferes 'test/testcases/block/09_html/html_to_native/table_simple.text', # bc of tr style attr getting removed 'test/testcases/block/09_html/simple.text', # bc of webgen:block elements 'test/testcases/block/11_ial/simple.text', # bc of change of ordering of attributes in header 'test/testcases/span/extension/comment.text', # bc of comment text modifications (can this be avoided?) 'test/testcases/block/04_header/header_type_offset.text', # bc of header_offset being applied twice ('test/testcases/block/04_header/with_auto_ids.text' if RUBY_VERSION <= '1.8.6'), # bc of dep stringex not working ('test/testcases/span/03_codespan/rouge/simple.text' if RUBY_VERSION < '2.0'), #bc of rouge ('test/testcases/span/03_codespan/rouge/disabled.text' if RUBY_VERSION < '2.0'), #bc of rouge 'test/testcases/block/06_codeblock/rouge/simple.text', 'test/testcases/block/06_codeblock/rouge/multiple.text', # check, what document contain more, than one code block 'test/testcases/block/15_math/ritex.text', # bc of tidy 'test/testcases/span/math/ritex.text', # bc of tidy 'test/testcases/block/15_math/itex2mml.text', # bc of tidy 'test/testcases/span/math/itex2mml.text', # bc of tidy 'test/testcases/block/15_math/mathjaxnode.text', # bc of tidy 'test/testcases/block/15_math/mathjaxnode_notexhints.text', # bc of tidy 'test/testcases/block/15_math/mathjaxnode_semantics.text', # bc of tidy 'test/testcases/span/math/mathjaxnode.text', # bc of tidy 'test/testcases/span/01_link/link_defs_with_ial.text', # bc of attribute ordering 'test/testcases/span/05_html/mark_element.text', # bc of tidy 'test/testcases/block/09_html/xml.text', # bc of tidy 'test/testcases/span/05_html/xml.text', # bc of tidy ].compact Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file| next if EXCLUDE_TEXT_FILES.any? {|f| text_file =~ /#{f}$/} html_file = text_file.sub(/\.text$/, '.html') html_file += '.19' if RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19') next unless File.exist?(html_file) define_method('test_' + text_file.tr('.', '_') + "_to_kramdown_to_html") do opts_file = text_file.sub(/\.text$/, '.options') opts_file = File.join(File.dirname(text_file), 'options') if !File.exist?(opts_file) options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1} kdtext = Kramdown::Document.new(File.read(text_file), options).to_kramdown html = Kramdown::Document.new(kdtext, options).to_html assert_equal(tidy_output(File.read(html_file)), tidy_output(html)) end end end # Generate test methods for html-to-kramdown-to-html conversion `tidy -v 2>&1` if $?.exitstatus != 0 warn("Skipping html-to-kramdown-to-html tests because tidy executable is missing") else EXCLUDE_HTML_KD_FILES = ['test/testcases/span/extension/options.html', # bc of parse_span_html option 'test/testcases/span/05_html/normal.html', # bc of br tag before closing p tag 'test/testcases/block/12_extension/nomarkdown.html', # bc of nomarkdown extension 'test/testcases/block/09_html/simple.html', # bc of webgen:block elements 'test/testcases/block/09_html/markdown_attr.html', # bc of markdown attr 'test/testcases/block/09_html/html_to_native/table_simple.html', # bc of invalidly converted simple table 'test/testcases/block/06_codeblock/whitespace.html', # bc of entity to char conversion 'test/testcases/block/06_codeblock/rouge/simple.html', # bc of double surrounding
'test/testcases/block/06_codeblock/rouge/multiple.html', # bc of double surrounding
'test/testcases/block/11_ial/simple.html', # bc of change of ordering of attributes in header 'test/testcases/span/03_codespan/highlighting.html', # bc of span elements inside code element 'test/testcases/block/04_header/with_auto_ids.html', # bc of auto_ids=true option 'test/testcases/block/04_header/header_type_offset.html', # bc of header_offset option 'test/testcases/block/16_toc/toc_exclude.html', # bc of different attribute ordering 'test/testcases/span/autolinks/url_links.html', # bc of quot entity being converted to char ('test/testcases/span/03_codespan/rouge/simple.html' if RUBY_VERSION < '2.0'), ('test/testcases/span/03_codespan/rouge/disabled.html' if RUBY_VERSION < '2.0'), 'test/testcases/block/15_math/ritex.html', # bc of tidy 'test/testcases/span/math/ritex.html', # bc of tidy 'test/testcases/block/15_math/itex2mml.html', # bc of tidy 'test/testcases/span/math/itex2mml.html', # bc of tidy 'test/testcases/block/15_math/mathjaxnode.html', # bc of tidy 'test/testcases/block/15_math/mathjaxnode_notexhints.html', # bc of tidy 'test/testcases/block/15_math/mathjaxnode_semantics.html', # bc of tidy 'test/testcases/span/math/mathjaxnode.html', # bc of tidy 'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax preview 'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of mathjax preview 'test/testcases/block/15_math/mathjax_preview_as_code.html', # bc of mathjax preview 'test/testcases/span/01_link/link_defs_with_ial.html', # bc of attribute ordering 'test/testcases/span/05_html/mark_element.html', # bc of tidy 'test/testcases/block/09_html/xml.html', # bc of tidy 'test/testcases/span/05_html/xml.html', # bc of tidy ].compact Dir[File.dirname(__FILE__) + '/testcases/**/*.{html,html.19}'].each do |html_file| next if EXCLUDE_HTML_KD_FILES.any? {|f| html_file =~ /#{f}(\.19)?$/} next if (RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19')) || (RUBY_VERSION < '1.9' && html_file =~ /\.19$/) define_method('test_' + html_file.tr('.', '_') + "_to_kramdown_to_html") do kd = Kramdown::Document.new(File.read(html_file), :input => 'html', :auto_ids => false, :footnote_nr => 1).to_kramdown opts_file = html_file.sub(/\.html(\.19)?$/, '.options') opts_file = File.join(File.dirname(html_file), 'options') if !File.exist?(opts_file) options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1} doc = Kramdown::Document.new(kd, options) assert_equal(tidy_output(File.read(html_file)), tidy_output(doc.to_html)) end end end # Generate test methods for text-manpage conversion Dir[File.dirname(__FILE__) + '/testcases/man/**/*.text'].each do |text_file| define_method('test_' + text_file.tr('.', '_') + "_to_man") do man_file = text_file.sub(/\.text$/, '.man') doc = Kramdown::Document.new(File.read(text_file)) assert_equal(File.read(man_file), doc.to_man) end end EXCLUDE_GFM_FILES = [ 'test/testcases/block/03_paragraph/no_newline_at_end.text', 'test/testcases/block/03_paragraph/indented.text', 'test/testcases/block/03_paragraph/two_para.text', 'test/testcases/block/04_header/atx_header.text', 'test/testcases/block/04_header/setext_header.text', 'test/testcases/block/04_header/with_auto_ids.text', # bc of ID generation difference 'test/testcases/block/04_header/with_auto_id_prefix.text', # bc of ID generation difference 'test/testcases/block/05_blockquote/indented.text', 'test/testcases/block/05_blockquote/lazy.text', 'test/testcases/block/05_blockquote/nested.text', 'test/testcases/block/05_blockquote/no_newline_at_end.text', 'test/testcases/block/06_codeblock/error.text', 'test/testcases/block/07_horizontal_rule/error.text', 'test/testcases/block/08_list/escaping.text', 'test/testcases/block/08_list/item_ial.text', 'test/testcases/block/08_list/lazy.text', 'test/testcases/block/08_list/list_and_others.text', 'test/testcases/block/08_list/other_first_element.text', 'test/testcases/block/08_list/simple_ul.text', 'test/testcases/block/08_list/special_cases.text', 'test/testcases/block/08_list/lazy_and_nested.text', # bc of change in lazy line handling 'test/testcases/block/09_html/comment.text', 'test/testcases/block/09_html/html_to_native/code.text', 'test/testcases/block/09_html/html_to_native/emphasis.text', 'test/testcases/block/09_html/html_to_native/typography.text', 'test/testcases/block/09_html/parse_as_raw.text', 'test/testcases/block/09_html/simple.text', 'test/testcases/block/12_extension/comment.text', 'test/testcases/block/12_extension/ignored.text', 'test/testcases/block/12_extension/nomarkdown.text', 'test/testcases/block/13_definition_list/item_ial.text', 'test/testcases/block/13_definition_list/multiple_terms.text', 'test/testcases/block/13_definition_list/no_def_list.text', 'test/testcases/block/13_definition_list/simple.text', 'test/testcases/block/13_definition_list/with_blocks.text', 'test/testcases/block/14_table/errors.text', 'test/testcases/block/14_table/escaping.text', 'test/testcases/block/14_table/simple.text', 'test/testcases/block/15_math/normal.text', 'test/testcases/block/16_toc/toc_with_footnotes.text', # bc of ID generation difference 'test/testcases/encoding.text', 'test/testcases/span/01_link/inline.text', 'test/testcases/span/01_link/link_defs.text', 'test/testcases/span/01_link/reference.text', 'test/testcases/span/02_emphasis/normal.text', 'test/testcases/span/03_codespan/normal.text', 'test/testcases/span/04_footnote/definitions.text', 'test/testcases/span/04_footnote/markers.text', 'test/testcases/span/05_html/across_lines.text', 'test/testcases/span/05_html/markdown_attr.text', 'test/testcases/span/05_html/normal.text', 'test/testcases/span/05_html/raw_span_elements.text', 'test/testcases/span/autolinks/url_links.text', 'test/testcases/span/extension/comment.text', 'test/testcases/span/ial/simple.text', 'test/testcases/span/line_breaks/normal.text', 'test/testcases/span/math/normal.text', 'test/testcases/span/text_substitutions/entities_as_char.text', 'test/testcases/span/text_substitutions/entities.text', 'test/testcases/span/text_substitutions/typography.text', ('test/testcases/span/03_codespan/rouge/simple.text' if RUBY_VERSION < '2.0'), ('test/testcases/span/03_codespan/rouge/disabled.text' if RUBY_VERSION < '2.0'), ('test/testcases/block/06_codeblock/rouge/simple.text' if RUBY_VERSION < '2.0'), #bc of rouge ('test/testcases/block/06_codeblock/rouge/disabled.text' if RUBY_VERSION < '2.0'), #bc of rouge ('test/testcases/block/06_codeblock/rouge/multiple.text' if RUBY_VERSION < '2.0'), #bc of rouge ('test/testcases/block/15_math/itex2mml.text' if RUBY_PLATFORM == 'java'), # bc of itextomml ('test/testcases/span/math/itex2mml.text' if RUBY_PLATFORM == 'java'), # bc of itextomml ].compact # Generate test methods for gfm-to-html conversion Dir[File.dirname(__FILE__) + '/{testcases,testcases_gfm}/**/*.text'].each do |text_file| next if EXCLUDE_GFM_FILES.any? {|f| text_file =~ /#{f}$/} basename = text_file.sub(/\.text$/, '') html_file = [(".html.19" if RUBY_VERSION >= '1.9'), ".html"].compact. map {|ext| basename + ext }. detect {|file| File.exist?(file) } next unless html_file define_method('test_gfm_' + text_file.tr('.', '_') + "_to_html") do opts_file = basename + '.options' opts_file = File.join(File.dirname(html_file), 'options') if !File.exist?(opts_file) options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1} doc = Kramdown::Document.new(File.read(text_file), options.merge(:input => 'GFM')) assert_equal(File.read(html_file), doc.to_html) end end EXCLUDE_PDF_MODIFY = ['test/testcases/span/text_substitutions/entities.text', 'test/testcases/span/text_substitutions/entities_numeric.text', 'test/testcases/span/text_substitutions/entities_as_char.text', 'test/testcases/span/text_substitutions/entities_as_input.text', 'test/testcases/span/text_substitutions/entities_symbolic.text', 'test/testcases/block/04_header/with_auto_ids.text', ].compact EXCLUDE_MODIFY = ['test/testcases/block/06_codeblock/rouge/multiple.text', # bc of HTMLFormater in options ] # Generate test methods for asserting that converters don't modify the document tree. Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file| opts_file = text_file.sub(/\.text$/, '.options') options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1} (Kramdown::Converter.constants.map {|c| c.to_sym} - [:Base, :RemoveHtmlTags, :MathEngine, :SyntaxHighlighter]).each do |conv_class| next if EXCLUDE_MODIFY.any? {|f| text_file =~ /#{f}$/} next if conv_class == :Pdf && (RUBY_VERSION < '2.0' || EXCLUDE_PDF_MODIFY.any? {|f| text_file =~ /#{f}$/}) define_method("test_whether_#{conv_class}_modifies_tree_with_file_#{text_file.tr('.', '_')}") do doc = Kramdown::Document.new(File.read(text_file), options) options_before = Marshal.load(Marshal.dump(doc.options)) tree_before = Marshal.load(Marshal.dump(doc.root)) Kramdown::Converter.const_get(conv_class).convert(doc.root, doc.options) assert_equal(options_before, doc.options) assert_tree_not_changed(tree_before, doc.root) end end end def assert_tree_not_changed(old, new) assert_equal(old.type, new.type, "type mismatch") if old.value.kind_of?(Kramdown::Element) assert_tree_not_changed(old.value, new.value) else assert(old.value == new.value, "value mismatch") end assert_equal(old.attr, new.attr, "attr mismatch") assert_equal(old.options, new.options, "options mismatch") assert_equal(old.children.length, new.children.length, "children count mismatch") old.children.each_with_index do |child, index| assert_tree_not_changed(child, new.children[index]) end end end kramdown-1.15.0/test/testcases/0000755000004100000410000000000013164166452016435 5ustar www-datawww-datakramdown-1.15.0/test/testcases/encoding.text0000644000004100000410000000120213164166452021124 0ustar www-datawww-dataDas ist gewöhnlich *ein* [Über-Problem](http://example.org) mit manchen Sälen und anderen Dinge. Siehe ![Über mich](http://example.org)! > Vielleicht *höre*{:.red} ich nicht richtig? {:.test} * Sollten wir uns das überl*egen*? *Verhöhne* mich nicht! * Ho ho höher! Sind \*wir\* da? Titel sind urschön ================== ## Manche mögens *ärmer* {#hot} öha was nun? Töne : Laute Geräusche : vielleicht noch was ä*hnliches* | hoch | höher | am höchsten | |----------------------------| | über | drüber | müde |

Das ist schön gemacht

kramdown-1.15.0/test/testcases/span/0000755000004100000410000000000013164166452017376 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/01_link/0000755000004100000410000000000013164166452020633 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/01_link/empty.html0000644000004100000410000000014513164166452022657 0ustar www-datawww-data

This is [] empty.

This is [][] empty.

This is empty.

kramdown-1.15.0/test/testcases/span/01_link/imagelinks.text0000644000004100000410000000053113164166452023663 0ustar www-datawww-dataSimple: ![alt text](/images/other.png) Simple with title: ![alt text](/images/other.png "title") Empty img link: ![alt text]() Reference style: ![alt text][img] Reference style with title: ![alt text][imgo] No alt text: ![](other.png) No id: ![imgo] [img]: other.png [imgo]: other.png "Title" With escaped pipe: ![an \| pipe](other.png) kramdown-1.15.0/test/testcases/span/01_link/link_defs_with_ial.html0000644000004100000410000000051413164166452025337 0ustar www-datawww-data

Link def with attr and attr 2 and attr 3 and attr before

test

kramdown-1.15.0/test/testcases/span/01_link/reference.html0000644000004100000410000000214013164166452023454 0ustar www-datawww-data

simple URL and URL

simple URL and URL

simple 1 and isurl

simple 1 and isurl

this is [a holy isurl]

no [resolution][] here and [here]

with a break in the text

this not [isurl] and not [isurl]

a Link with_BIG letters

bad [no URL] d isurl

[no url] invalid.html [no url]:

“title”

test url but no title test [urldef]

[urldef]: some.url ‘title”

some with spaces

this is a ‘special’ occasion for /all/ of us

this is predefined for URI

kramdown-1.15.0/test/testcases/span/01_link/links_with_angle_brackets.html0000644000004100000410000000017513164166452026723 0ustar www-datawww-data

This is a link.

This is a link.

kramdown-1.15.0/test/testcases/span/01_link/image_in_a.text0000644000004100000410000000031513164166452023610 0ustar www-datawww-dataSimple: [Some ![alt text](/images/other.png)](local.html) Nested: [Some ![alt ![img](text.png) text](/images/other.png)](local.html) Simple: [Some *text ![alt text](/images/other.png) text*](local.html) kramdown-1.15.0/test/testcases/span/01_link/link_defs.html0000644000004100000410000000050013164166452023452 0ustar www-datawww-data

This is a para. [id]: http://www.example.com/

[4]: nourl

Points to 1 and 2 and 3 but not [4]

Points to _.:,;!?- and otherid8

kramdown-1.15.0/test/testcases/span/01_link/image_in_a.html0000644000004100000410000000047213164166452023574 0ustar www-datawww-data

Simple: Some alt text

Nested: Some alt ![img](text.png) text

Simple: Some text alt text text

kramdown-1.15.0/test/testcases/span/01_link/latex_escaping.latex0000644000004100000410000000035213164166452024660 0ustar www-datawww-data\href{https://example.com/~tilde/}{https://example.com/\ensuremath{\sim}tilde/} \href{http://example.com/percent\%20percent}{http://example.com/percent\%20percent} \href{http://example.com/hash#hash}{http://example.com/hash\#hash} kramdown-1.15.0/test/testcases/span/01_link/latex_escaping.text0000644000004100000410000000014613164166452024530 0ustar www-datawww-data kramdown-1.15.0/test/testcases/span/01_link/reference.options0000644000004100000410000000010613164166452024203 0ustar www-datawww-data:link_defs: predefined: [predefined.html] URI: [uri.html, My URI] kramdown-1.15.0/test/testcases/span/01_link/inline.html0000644000004100000410000000261613164166452023004 0ustar www-datawww-data

simple URL

simple URL

simple URL with formatting

simple URL with single quoted title

simple URL with double quoted title

simple URL [with ] escaped

simple URL with ] escaped

simple URL [with] nested

simple URL with [no](link.html) inside

simple URL with parens

simple URL with parens

simple URL broken on line

simple URL with spaces

simple URL with spaces

simple URL with spaces

simple leading/trailing spaces

simple leading/trailing spaces

simple leading/trailing spaces

bad [URL not

bad [URL with parens](something(new.html)

bad [URL with empty title](something.html ‘’)

bad [URL](

bad [URL](no

kramdown-1.15.0/test/testcases/span/01_link/empty.text0000644000004100000410000000010513164166452022673 0ustar www-datawww-dataThis is [] empty. This is [][] empty. This is [](test.html) empty. kramdown-1.15.0/test/testcases/span/01_link/empty_title.htmlinput0000644000004100000410000000025213164166452025137 0ustar www-datawww-data

Image with empty title: alt text

Link reference with empty title.

kramdown-1.15.0/test/testcases/span/01_link/reference.html.190000644000004100000410000000211013164166452023701 0ustar www-datawww-data

simple URL and URL

simple URL and URL

simple 1 and isurl

simple 1 and isurl

this is [a holy isurl]

no [resolution][] here and [here]

with a break in the text

this not [isurl] and not [isurl]

a Link with_BIG letters

bad [no URL] d isurl

[no url] invalid.html [no url]:

“title”

test url but no title test [urldef]

[urldef]: some.url ‘title”

some with spaces

this is a ‘special’ occasion for /all/ of us

this is predefined for URI

kramdown-1.15.0/test/testcases/span/01_link/link_defs.text0000644000004100000410000000116513164166452023502 0ustar www-datawww-dataThis is a para. [id]: http://www.example.com/ [otherid1]: http://wwww.example.com/ "title 1" [otherid2]: http://wwww.example.com/ 'title 2' [otherid3]: [otherid4]: 'title' [otherid5]: some spaces.html [otherid6]: some spaces.html 'title' [otherid7]: some spaces "title" [otherid8]:test.html#'test' 'title' [break]: http://www.example.com/test/asdf.html 'Another title' [1]: ignored.url [1]: one.url [2]: two.url [3]: three.url [4]: nourl Points to [1] and [2] and [3] but not [4] [_.:,;!?-]: http://example.com Points to [_.:,;!?-] and [otherid8] kramdown-1.15.0/test/testcases/span/01_link/inline.html.190000644000004100000410000000260613164166452023233 0ustar www-datawww-data

simple URL

simple URL

simple URL with formatting

simple URL with single quoted title

simple URL with double quoted title

simple URL [with ] escaped

simple URL with ] escaped

simple URL [with] nested

simple URL with [no](link.html) inside

simple URL with parens

simple URL with parens

simple URL broken on line

simple URL with spaces

simple URL with spaces

simple URL with spaces

simple leading/trailing spaces

simple leading/trailing spaces

simple leading/trailing spaces

bad [URL not

bad [URL with parens](something(new.html)

bad [URL with empty title](something.html ‘’)

bad [URL](

bad [URL](no

kramdown-1.15.0/test/testcases/span/01_link/reference.text0000644000004100000410000000144013164166452023476 0ustar www-datawww-data[isurl]: someurl.html [1]: otherurl.html simple [URL][1] and [URL][isurl] simple [URL] [1] and [URL] [isurl] simple [1][] and [isurl][] simple [1] and [isurl] this is [a holy [isurl]] no [resolution][] here and [here] with a [break in the text] [break in the text]: url.html this not \[isurl] and not [isurl\] a [Link with_BIG] letters [link WITH_big]: letters.html 'This is the title' bad [no URL] d [isurl] [no url] invalid.html [no url]: [URL but no title]: invalid.html "title" test [url but no title] test [urldef] [urldef]: some.url 'title" some [with spaces] [with spaces]: with spaces.html "title" this [is a 'special' occasion for /all/ of us] [is a 'special' occasion for /all/ of us]: occasion.html this is [predefined] for [URI] kramdown-1.15.0/test/testcases/span/01_link/imagelinks.html0000644000004100000410000000103413164166452023642 0ustar www-datawww-data

Simple: alt text

Simple with title: alt text

Empty img link: alt text

Reference style: alt text

Reference style with title: alt text

No alt text:

No id: imgo

With escaped pipe: an | pipe

kramdown-1.15.0/test/testcases/span/01_link/links_with_angle_brackets.text0000644000004100000410000000012713164166452026740 0ustar www-datawww-dataThis is a [link](). This is a [link]( 'and title'). kramdown-1.15.0/test/testcases/span/01_link/inline.text0000644000004100000410000000176213164166452023025 0ustar www-datawww-datasimple [URL]() simple [URL](something.html) simple [URL *with* formatting](something.html) simple [URL with single quoted title](something.html 'a t"itle') simple [URL with double quoted title](something.html "a t'itle") simple [URL \[with \] escaped](something.html) simple [URL with \] escaped](something.html) simple [URL [with] nested](something.html) simple [URL with [no](link.html) inside](something.html) simple [URL with parens](/something/to(do)) simple [URL with parens](/something/to(do "doit") simple [URL broken on line](something.html "title") simple [URL with spaces](with spaces.html) simple [URL with spaces](with spaces.html 'title') simple [URL with spaces](with (spaces).html) simple [leading/trailing spaces]( spaces.html) simple [leading/trailing spaces](spaces.html ) simple [leading/trailing spaces]( spaces.html ) bad [URL [not](something.html) bad [URL with parens](something(new.html) bad [URL with empty title](something.html '') bad [URL]( bad [URL](no kramdown-1.15.0/test/testcases/span/01_link/link_defs_with_ial.text0000644000004100000410000000045313164166452025361 0ustar www-datawww-dataLink def with [attr] and [attr 2] and [attr 3] and [attr before] [attr]: http://example.com 'title' {: hreflang="en" .test} [attr 2]: http://example.com 'title' {: hreflang="en"} {: .test} [attr 3]: http://example.com {: .test} test {: hreflang="en"} {: .test} [attr before]: http://example.com kramdown-1.15.0/test/testcases/span/01_link/empty_title.text0000644000004100000410000000017113164166452024077 0ustar www-datawww-dataImage with empty title: ![alt text](/images/other.png) Link [reference][1] with empty title. [1]: http://example.tld kramdown-1.15.0/test/testcases/span/04_footnote/0000755000004100000410000000000013164166452021536 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/04_footnote/definitions.latex0000644000004100000410000000030513164166452025106 0ustar www-datawww-dataSome para. \begin{quote} blockquote \end{quote} \begin{itemize} \item{} a list with some text \end{itemize} \begin{itemize} \item{} other list \end{itemize} \begin{verbatim}code \end{verbatim} kramdown-1.15.0/test/testcases/span/04_footnote/inside_footnote.html0000644000004100000410000000130713164166452025615 0ustar www-datawww-data

Lorem ipsum1 dolor sit amet.

Lorem ipsum2 dolor sit amet.

  1. Consecutur adisping.3 

  2. Sed ut perspiciatis unde omnis. 

  3. Sed ut. 

kramdown-1.15.0/test/testcases/span/04_footnote/markers.options0000644000004100000410000000005313164166452024615 0ustar www-datawww-data:auto_ids: false :entity_output: :symbolic kramdown-1.15.0/test/testcases/span/04_footnote/placement.options0000644000004100000410000000003113164166452025115 0ustar www-datawww-data:entity_output: :numeric kramdown-1.15.0/test/testcases/span/04_footnote/without_backlink.html0000644000004100000410000000030313164166452025761 0ustar www-datawww-data

Some footnote here1

  1. Some text here

kramdown-1.15.0/test/testcases/span/04_footnote/without_backlink.text0000644000004100000410000000005713164166452026007 0ustar www-datawww-dataSome footnote here[^fn] [^fn]: Some text here kramdown-1.15.0/test/testcases/span/04_footnote/markers.text0000644000004100000410000000054713164166452024116 0ustar www-datawww-dataThis is some *ref.[^fn] [^fn]: Some foot note text {: .class} > a blockquote [^3] * and a list item [^1] # And a header[^now] [^1]:some *text* [^3]: other text with more lines > and a quote A marker without a definition [^without]. A marker [^empty] used twice[^fn] and thrice[^fn]. [^now]: code block continued here [^empty]: kramdown-1.15.0/test/testcases/span/04_footnote/regexp_problem.text0000644000004100000410000000016513164166452025460 0ustar www-datawww-data# Something something[^note1]. # Footnotes [^note1]: A note # Test kramdown-1.15.0/test/testcases/span/04_footnote/backlink_text.options0000644000004100000410000000005213164166452025772 0ustar www-datawww-data:footnote_backlink: 'text &8617; ' kramdown-1.15.0/test/testcases/span/04_footnote/placement.text0000644000004100000410000000017213164166452024414 0ustar www-datawww-data* footnotes will be placed here {:footnotes} Some para with a[^1] footnote. [^1]: Footnote \\\` text And another para. kramdown-1.15.0/test/testcases/span/04_footnote/footnote_nr.text0000644000004100000410000000012613164166452024777 0ustar www-datawww-dataThis is a footnote[^ab]. And another[^bc]. [^ab]: Some text. [^bc]: Some other text. kramdown-1.15.0/test/testcases/span/04_footnote/regexp_problem.options0000644000004100000410000000005313164166452026163 0ustar www-datawww-data:auto_ids: false :entity_output: :symbolic kramdown-1.15.0/test/testcases/span/04_footnote/definitions.text0000644000004100000410000000036713164166452024765 0ustar www-datawww-dataSome para. [^footnote]: ignored definition [^footnote]: Some footnote text > blockquote [^other]: some foot note text * a list with some text [^tnote]: foot note * other list ^ code [^1]: > a blockquote and some para kramdown-1.15.0/test/testcases/span/04_footnote/without_backlink.options0000644000004100000410000000002713164166452026513 0ustar www-datawww-data:footnote_backlink: '' kramdown-1.15.0/test/testcases/span/04_footnote/footnote_nr.latex0000644000004100000410000000012213164166452025124 0ustar www-datawww-dataThis is a footnote\footnote{Some text.}. And another\footnote{Some other text.}. kramdown-1.15.0/test/testcases/span/04_footnote/footnote_nr.options0000644000004100000410000000002113164166452025500 0ustar www-datawww-data:footnote_nr: 35 kramdown-1.15.0/test/testcases/span/04_footnote/inside_footnote.text0000644000004100000410000000026113164166452025633 0ustar www-datawww-dataLorem ipsum[^first] dolor sit amet. Lorem ipsum[^second] dolor sit amet. [^first]: Consecutur adisping.[^third] [^second]: Sed ut perspiciatis unde omnis. [^third]: Sed ut. kramdown-1.15.0/test/testcases/span/04_footnote/markers.latex0000644000004100000410000000076113164166452024245 0ustar www-datawww-dataThis is some *ref.\footnote{Some foot note text} \begin{quote} a blockquote \footnote{other text with more lines \begin{quote} and a quote \end{quote}} \end{quote} \begin{itemize} \item{} and a list item \footnote{some \emph{text}} \end{itemize} \section*{And a header\footnote{\begin{verbatim}code block continued here \end{verbatim}}} A marker without a definition {[}\^{}without{]}. A marker \footnote{} used twice\footnote{Some foot note text} and thrice\footnote{Some foot note text}. kramdown-1.15.0/test/testcases/span/04_footnote/backlink_text.html0000644000004100000410000000041613164166452025247 0ustar www-datawww-data

Some footnote here1

  1. Some text here text &8617; <img />

kramdown-1.15.0/test/testcases/span/04_footnote/definitions.html0000644000004100000410000000026013164166452024735 0ustar www-datawww-data

Some para.

blockquote

  • a list with some text
  • other list
code
kramdown-1.15.0/test/testcases/span/04_footnote/backlink_text.text0000644000004100000410000000005713164166452025270 0ustar www-datawww-dataSome footnote here[^fn] [^fn]: Some text here kramdown-1.15.0/test/testcases/span/04_footnote/markers.html0000644000004100000410000000307613164166452024076 0ustar www-datawww-data

This is some *ref.1

a blockquote 2

  • and a list item 3

And a header4

A marker without a definition [^without].

A marker 5 used twice1 and thrice1.

  1. Some foot note text  2 3

  2. other text with more lines

    and a quote

  3. some text 

  4. code block
    continued here
    

kramdown-1.15.0/test/testcases/span/04_footnote/footnote_nr.html0000644000004100000410000000071013164166452024756 0ustar www-datawww-data

This is a footnote35. And another36.

  1. Some text. 

  2. Some other text. 

kramdown-1.15.0/test/testcases/span/04_footnote/regexp_problem.html0000644000004100000410000000046213164166452025440 0ustar www-datawww-data

Something

something1.

Footnotes

Test

  1. A note 

kramdown-1.15.0/test/testcases/span/04_footnote/placement.html0000644000004100000410000000044013164166452024372 0ustar www-datawww-data
  1. Footnote \` text 

Some para with a1 footnote.

And another para.

kramdown-1.15.0/test/testcases/span/03_codespan/0000755000004100000410000000000013164166452021474 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/03_codespan/empty.html0000644000004100000410000000011513164166452023515 0ustar www-datawww-data

This is `` empty.

This is ``empty.

This is ````empty.

kramdown-1.15.0/test/testcases/span/03_codespan/rouge/0000755000004100000410000000000013164166452022615 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/03_codespan/rouge/disabled.text0000644000004100000410000000004613164166452025272 0ustar www-datawww-dataYou can say `Class`{:.language-ruby}. kramdown-1.15.0/test/testcases/span/03_codespan/rouge/disabled.html0000644000004100000410000000007513164166452025254 0ustar www-datawww-data

You can say Class.

kramdown-1.15.0/test/testcases/span/03_codespan/rouge/simple.text0000644000004100000410000000007313164166452025014 0ustar www-datawww-dataYou can say `x = Class.new`{:.language-ruby}, for example. kramdown-1.15.0/test/testcases/span/03_codespan/rouge/simple.html0000644000004100000410000000033113164166452024771 0ustar www-datawww-data

You can say x = Class.new, for example.

kramdown-1.15.0/test/testcases/span/03_codespan/rouge/simple.options0000644000004100000410000000003313164166452025517 0ustar www-datawww-data:syntax_highlighter: rouge kramdown-1.15.0/test/testcases/span/03_codespan/rouge/disabled.options0000644000004100000410000000011713164166452026000 0ustar www-datawww-data:syntax_highlighter: rouge :syntax_highlighter_opts: span: disable: true kramdown-1.15.0/test/testcases/span/03_codespan/errors.html0000644000004100000410000000003013164166452023667 0ustar www-datawww-data

Not ended `span.

kramdown-1.15.0/test/testcases/span/03_codespan/normal.html0000644000004100000410000000053313164166452023653 0ustar www-datawww-data

This is a simple span.

With some<ht>&ml in it.

And ` backticks.

And ``some`` more.

With backslash in\ it.

This is a ` literal backtick. As `are` these!

No literal backtick.

something

kramdown-1.15.0/test/testcases/span/03_codespan/highlighting.html0000644000004100000410000000026413164166452025031 0ustar www-datawww-data

You can say x = Class.new, for example.

kramdown-1.15.0/test/testcases/span/03_codespan/highlighting-minted.options0000644000004100000410000000003413164166452027031 0ustar www-datawww-data:syntax_highlighter: minted kramdown-1.15.0/test/testcases/span/03_codespan/highlighting-minted.latex0000644000004100000410000000007413164166452026457 0ustar www-datawww-dataYou can say \mintinline{ruby}{x = Class.new}, for example. kramdown-1.15.0/test/testcases/span/03_codespan/errors.text0000644000004100000410000000002113164166452023707 0ustar www-datawww-dataNot ended `span. kramdown-1.15.0/test/testcases/span/03_codespan/highlighting.text0000644000004100000410000000007313164166452025047 0ustar www-datawww-dataYou can say `x = Class.new`{:.language-ruby}, for example. kramdown-1.15.0/test/testcases/span/03_codespan/empty.text0000644000004100000410000000007013164166452023535 0ustar www-datawww-dataThis is `` empty. This is ``empty. This is ````empty. kramdown-1.15.0/test/testcases/span/03_codespan/highlighting-minted.text0000644000004100000410000000007313164166452026325 0ustar www-datawww-dataYou can say `x = Class.new`{:.language-ruby}, for example. kramdown-1.15.0/test/testcases/span/03_codespan/normal.text0000644000004100000410000000033313164166452023671 0ustar www-datawww-dataThis is `a` simple span. With `some&ml` in it. And `` ` `` backticks. And ``` ``some`` ``` more. With backslash `in\` it. This is a ` literal backtick. As \`are\` these! No `` literal backtick``. `something` kramdown-1.15.0/test/testcases/span/05_html/0000755000004100000410000000000013164166452020646 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/05_html/button.html0000644000004100000410000000037513164166452023054 0ustar www-datawww-data

First some text and then a

and then text.

A it.

kramdown-1.15.0/test/testcases/span/05_html/normal.html0000644000004100000410000000155213164166452023027 0ustar www-datawww-data

Empty !

title is a title.

This is .

This is comment.

This is multiline comment.

This is tag now .

This is tag now.

This is an empty tag.

This is something strange.

Auto-closing:

Expanding:

An invalid tag: <hR>

A <p>block tag</p>.

An invalid </closing> tag.

A tag.

An unclosed tag.

Some element with | pipe symbol

Some element with | pipe symbol

Some element with | pipe symbol|

underlined

kramdown-1.15.0/test/testcases/span/05_html/invalid.html0000644000004100000410000000004613164166452023162 0ustar www-datawww-data

This is some text

kramdown-1.15.0/test/testcases/span/05_html/raw_span_elements.html0000644000004100000410000000017113164166452025241 0ustar www-datawww-data

This is raw --version and --version and --version and ---version.

kramdown-1.15.0/test/testcases/span/05_html/markdown_attr.text0000644000004100000410000000047613164166452024437 0ustar www-datawww-dataThis is *text* This is *text* This is *text* This is *text* This is *nothing* to *fear* about. This is . kramdown-1.15.0/test/testcases/span/05_html/link_with_mailto.html0000644000004100000410000000007013164166452025066 0ustar www-datawww-data

Link: text

kramdown-1.15.0/test/testcases/span/05_html/mark_element.text0000644000004100000410000000004013164166452024211 0ustar www-datawww-dataLorem ipsum. Test kramdown-1.15.0/test/testcases/span/05_html/across_lines.html0000644000004100000410000000005113164166452024214 0ustar www-datawww-data

Link: test

kramdown-1.15.0/test/testcases/span/05_html/mark_element.html0000644000004100000410000000005613164166452024200 0ustar www-datawww-data

Lorem ipsum.

Test

kramdown-1.15.0/test/testcases/span/05_html/raw_span_elements.text0000644000004100000410000000016213164166452025261 0ustar www-datawww-dataThis is raw --version and --version and --version and ---version. kramdown-1.15.0/test/testcases/span/05_html/link_with_mailto.text0000644000004100000410000000006113164166452025106 0ustar www-datawww-dataLink: text kramdown-1.15.0/test/testcases/span/05_html/across_lines.text0000644000004100000410000000004213164166452024234 0ustar www-datawww-dataLink: test kramdown-1.15.0/test/testcases/span/05_html/xml.text0000644000004100000410000000021113164166452022346 0ustar www-datawww-dataThis doit test This doit test This doit test kramdown-1.15.0/test/testcases/span/05_html/markdown_attr.html0000644000004100000410000000040513164166452024407 0ustar www-datawww-data

This is text This is *text* This is text This is text This is *nothing* to fear about. This is <http://example.com>.

kramdown-1.15.0/test/testcases/span/05_html/normal.text0000644000004100000410000000124713164166452023050 0ustar www-datawww-dataEmpty ! title is a title. This is . This is comment. This is multiline comment. This is tag now . This is tag now. This is an empty tag. This is _something strange_. Auto-closing:
Expanding: An invalid tag:
A

block tag

. An invalid tag. A tag. An unclosed *tag.* Some element with | pipe symbol Some element with | pipe symbol Some element with | pipe symbol| underlined kramdown-1.15.0/test/testcases/span/05_html/xml.html0000644000004100000410000000025313164166452022334 0ustar www-datawww-data

This doit test

This doit test

This doit</some> test

kramdown-1.15.0/test/testcases/span/05_html/invalid.text0000644000004100000410000000003013164166452023173 0ustar www-datawww-dataThis is some text kramdown-1.15.0/test/testcases/span/05_html/button.text0000644000004100000410000000027113164166452023067 0ustar www-datawww-data First some text and then a and then text. A it. kramdown-1.15.0/test/testcases/span/02_emphasis/0000755000004100000410000000000013164166452021510 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/02_emphasis/empty.html0000644000004100000410000000007413164166452023535 0ustar www-datawww-data

This __is **empty.

This **is empty.

kramdown-1.15.0/test/testcases/span/02_emphasis/errors.html0000644000004100000410000000021313164166452023706 0ustar www-datawww-data

This is a *star.

This is a **star.

This is *a *star.

This is *a star*.

This** is** a star.

kramdown-1.15.0/test/testcases/span/02_emphasis/normal.html0000644000004100000410000000242013164166452023664 0ustar www-datawww-data

This is so hard.

This is so hard too.

At start At start

At end At end

At start At start

At end At end

And nested.

And nest**ed.

And *nested* like this.

And not_nest_ed.

And nested.

And nested.

And neste.

And lonely * here*.

And lonely ** here**.

And lonely ** here.

** and here**.

And compli*cated * here

Some**what more * **here

Do it *this* way Or this *this* way Or that *that* way Or that *that* way

http://blah.com/blah_%28

A-_B

  • test
  • test
  • test
  • (“test”)
  • (test)
  • test
  • `test
  • test
kramdown-1.15.0/test/testcases/span/02_emphasis/nesting.html0000644000004100000410000000224313164166452024046 0ustar www-datawww-data
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • test test
  • ab
  • ab
  • abc
  • ab
  • ab
  • abc
  • _a_b
  • a_b_
  • a_b_c
  • __a__b
  • a__b__
  • a__b__c
  • a__2__c
  • a__2__3
  • 1__2__3
  • a _b_ c
  • a __b__ c
kramdown-1.15.0/test/testcases/span/02_emphasis/errors.text0000644000004100000410000000014213164166452023727 0ustar www-datawww-dataThis is a *star. This is a **star. This is **a *star*. This is *a star\*. This** is** a star. kramdown-1.15.0/test/testcases/span/02_emphasis/normal.options0000644000004100000410000000003113164166452024407 0ustar www-datawww-data:entity_output: :numeric kramdown-1.15.0/test/testcases/span/02_emphasis/nesting.text0000644000004100000410000000073613164166452024073 0ustar www-datawww-data- ***test test*** - ___test test___ - *test **test*** - **test *test*** - ***test* test** - ***test** test* - ***test* test** - **test *test*** - *test **test*** - _test __test___ - __test _test___ - ___test_ test__ - ___test__ test_ - ___test_ test__ - __test _test___ - _test __test___ ^ - *a*b - a*b* - a*b*c - **a**b - a**b** - a**b**c ^ - _a_b - a_b_ - a_b_c - __a__b - a__b__ - a__b__c - a__2__c - a__2__3 - 1__2__3 ^ - *a _b_ c* - **a __b__ c** kramdown-1.15.0/test/testcases/span/02_emphasis/empty.text0000644000004100000410000000004713164166452023555 0ustar www-datawww-dataThis __is **empty. This ****is empty. kramdown-1.15.0/test/testcases/span/02_emphasis/normal.text0000644000004100000410000000124613164166452023711 0ustar www-datawww-dataThis *is* so **hard**. This _is_ so __hard__ too. *At* start *At* start At *end* At *end* _At_ start _At_ start At _end_ At _end_ And *nest**ed***. And *nest**ed*. And *nest**ed* like** this. And *not_nest_ed*. And ***nested***. And ___nested___. And **nest*e***. And lonely * here*. And lonely ** here**. And **lonely ** here**. ** and here**. And **compli*cated \*** here Some***what* more * ***he*re Do it *\*this\** way Or this \**this*\* way Or that *\*that*\* way Or that \**that\** way [http://blah.com/blah_%28](http://blah.com/blah_%28) [A-_B](A_-B) - _test_ - '_test_' - "_test_" - ("_test_") - (_test_) - “_test_” - \`_test_' - „_test_“ kramdown-1.15.0/test/testcases/span/escaped_chars/0000755000004100000410000000000013164166452022162 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/escaped_chars/normal.html0000644000004100000410000000040313164166452024335 0ustar www-datawww-data

\

.

*

_

+

-

`

(

)

[

]

{

}

#

!

<<

>>

:

|

"

'

=

>

<

kramdown-1.15.0/test/testcases/span/escaped_chars/normal.text0000644000004100000410000000014113164166452024354 0ustar www-datawww-data\\ \. \* \_ \+ \- \` \( \) \[ \] \{ \} \# \! \<< \>> \: \| \" \' \= \> \< kramdown-1.15.0/test/testcases/span/abbreviations/0000755000004100000410000000000013164166452022226 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/abbreviations/abbrev_defs.text0000644000004100000410000000017313164166452025377 0ustar www-datawww-data*[ABBR]: Some abbreviations *[one abbr]: one abbrev *[2 and other]: another *[3]: yet another *[4]: noabbrev kramdown-1.15.0/test/testcases/span/abbreviations/abbrev.text0000644000004100000410000000103613164166452024375 0ustar www-datawww-dataThis is some text. *[is some]: Yes it is *[OtHeR!]: This & that *[is some]: It is, yes *[empty]: There *is some real* concern about OtHeR! is some Think empty about Oesterreich. CSS und CSS3 no abbrev here because there is someone and kulis some *[Oesterreich]: Very nice country *[CSS]: Cascading *[CSS3]: Cascading 3 * (X)HTML test * line two [(X)HTML](http://en.wikipedia.org/wiki/Xhtml) * test (X)HTML *[(X)HTML]: (eXtensible) HyperText Markup Language This is awesome. {:.testit} *[awesome]: Some text here {:.test} kramdown-1.15.0/test/testcases/span/abbreviations/abbrev_defs.html0000644000004100000410000000005013164166452025351 0ustar www-datawww-data
*[4]: noabbrev
kramdown-1.15.0/test/testcases/span/abbreviations/in_footnote.html0000644000004100000410000000047313164166452025443 0ustar www-datawww-data

There is a TXT file here. 1

  1. A TXT file. 

kramdown-1.15.0/test/testcases/span/abbreviations/in_footnote.text0000644000004100000410000000010513164166452025453 0ustar www-datawww-dataThere is a TXT file here. [^1] *[TXT]: Text File [^1]: A TXT file. kramdown-1.15.0/test/testcases/span/abbreviations/abbrev.html0000644000004100000410000000155213164166452024360 0ustar www-datawww-data

This is some text.

There is some real concern about OtHeR!

is some Think empty about Oesterreich. CSS und CSS3

no abbrev here because there is someone and kulis some

  • (X)HTML test
  • line two

(X)HTML

  • test (X)HTML

This is awesome.

kramdown-1.15.0/test/testcases/span/autolinks/0000755000004100000410000000000013164166452021407 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/autolinks/url_links.html0000644000004100000410000000213513164166452024300 0ustar www-datawww-data

This should be a http://www.example.com/ link. This should be a john.doe@example.com link. As should john.doe@example.com this. As should john_doe@example.com this. As should CSS@example.com this. Another ampersand http://www.example.com/?doit&x=y link. More entities http://www.example.com/?doit&x="y&z=y.

Email international übung@macht.den.meister.de, ü.äß@hülse.de Email invalid: <me@example.com>

Autolink with underscore: http://www.example.com/with_under_score

http://www.example.com/

kramdown-1.15.0/test/testcases/span/autolinks/url_links.text0000644000004100000410000000110713164166452024316 0ustar www-datawww-dataThis should be a link. This should be a link. As should this. As should this. As should this. Another ampersand link. More entities . Email international <übung@macht.den.meister.de>, <ü.äß@hülse.de> Email invalid: <[me@example.com](mailtos:me@example.com)> Autolink with underscore: *[CSS]: Cascading kramdown-1.15.0/test/testcases/span/ial/0000755000004100000410000000000013164166452020143 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/ial/simple.text0000644000004100000410000000023013164166452022335 0ustar www-datawww-dataThis is a `span`{: .hund #dog}. This is a `span`{: .hund #dog}{: .katz key='val'}. This is an{: .ignored} span ial. This is an\{: .escaped} span ial. kramdown-1.15.0/test/testcases/span/ial/simple.html0000644000004100000410000000031613164166452022322 0ustar www-datawww-data

This is a span.

This is a span.

This is an{: .ignored} span ial. This is an{: .escaped} span ial.

kramdown-1.15.0/test/testcases/span/extension/0000755000004100000410000000000013164166452021412 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/extension/options.text0000644000004100000410000000011513164166452024010 0ustar www-datawww-dataThis is an {::options parse_span_html="false" /} option *true*! kramdown-1.15.0/test/testcases/span/extension/nomarkdown.text0000644000004100000410000000004713164166452024500 0ustar www-datawww-dataThis is {::nomarkdown}*some*{:/} text. kramdown-1.15.0/test/testcases/span/extension/ignored.text0000644000004100000410000000004313164166452023744 0ustar www-datawww-dataThis is {::something}paragraph{:/} kramdown-1.15.0/test/testcases/span/extension/nomarkdown.html0000644000004100000410000000003413164166452024454 0ustar www-datawww-data

This is *some* text.

kramdown-1.15.0/test/testcases/span/extension/comment.text0000644000004100000410000000041113164166452023756 0ustar www-datawww-dataThis is a {::comment}simple{:/} paragraph. This is a {::comment}simple{:/comment} paragraph. This is a {::comment}simple {:/other} paragraph{:/comment}. This is a {::comment/} paragraph. This is a {:/comment} simple {:/} paragraph. This is a {::comment} paragraph. kramdown-1.15.0/test/testcases/span/extension/comment.html0000644000004100000410000000034413164166452023743 0ustar www-datawww-data

This is a paragraph. This is a paragraph. This is a . This is a paragraph. This is a {:/comment} simple {:/} paragraph. This is a {::comment} paragraph.

kramdown-1.15.0/test/testcases/span/extension/options.html0000644000004100000410000000005713164166452023775 0ustar www-datawww-data

This is an option *true*!

kramdown-1.15.0/test/testcases/span/extension/ignored.html0000644000004100000410000000005213164166452023724 0ustar www-datawww-data

This is {::something}paragraph{:/}

kramdown-1.15.0/test/testcases/span/math/0000755000004100000410000000000013164166452020327 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/math/mathjaxnode.html.190000644000004100000410000000074713164166452023757 0ustar www-datawww-data

This is f ( x ) = a x 3 + b x 2 + c x + d something!

kramdown-1.15.0/test/testcases/span/math/mathjaxnode.text0000644000004100000410000000006713164166452023542 0ustar www-datawww-dataThis is $$f(x) = a{x^3} + b{x^2} + cx + d$$ something! kramdown-1.15.0/test/testcases/span/math/itex2mml.html0000644000004100000410000000072613164166452022763 0ustar www-datawww-data

This is f(x)=ax 3+bx 2+cx+df(x) = a{x^3} + b{x^2} + cx + d something!

kramdown-1.15.0/test/testcases/span/math/mathjaxnode.options0000644000004100000410000000003213164166452024241 0ustar www-datawww-data:math_engine: mathjaxnode kramdown-1.15.0/test/testcases/span/math/normal.html0000644000004100000410000000047713164166452022515 0ustar www-datawww-data

This is some math. With new line characters in between.

inline math, $5.00 $$no math$$

$$5+5$$ inline math

$$5+5$$

kramdown-1.15.0/test/testcases/span/math/ritex.html0000644000004100000410000000054413164166452022353 0ustar www-datawww-data

This is f(x)=ax3+bx2+cx+d something!

kramdown-1.15.0/test/testcases/span/math/itex2mml.options0000644000004100000410000000002713164166452023504 0ustar www-datawww-data:math_engine: itex2mml kramdown-1.15.0/test/testcases/span/math/itex2mml.text0000644000004100000410000000006713164166452023001 0ustar www-datawww-dataThis is $$f(x) = a{x^3} + b{x^2} + cx + d$$ something! kramdown-1.15.0/test/testcases/span/math/ritex.text0000644000004100000410000000006713164166452022373 0ustar www-datawww-dataThis is $$f(x) = a{x^3} + b{x^2} + cx + d$$ something! kramdown-1.15.0/test/testcases/span/math/normal.text0000644000004100000410000000025613164166452022530 0ustar www-datawww-dataThis is $$\lambda_\alpha > 5$$ some math. With $$1 + 1$$ new line characters in between. $$5+5$$ inline math, $5.00 \$$no math$$ \$\$5+5$$ inline math \$$5+5$$ \$\$5+5$$ kramdown-1.15.0/test/testcases/span/math/no_engine.html0000644000004100000410000000006513164166452023157 0ustar www-datawww-data

$5+5$ inline math

kramdown-1.15.0/test/testcases/span/math/no_engine.text0000644000004100000410000000002413164166452023172 0ustar www-datawww-data$$5+5$$ inline math kramdown-1.15.0/test/testcases/span/math/no_engine.options0000644000004100000410000000002013164166452023675 0ustar www-datawww-data:math_engine: ~ kramdown-1.15.0/test/testcases/span/math/ritex.options0000644000004100000410000000002413164166452023073 0ustar www-datawww-data:math_engine: ritex kramdown-1.15.0/test/testcases/span/text_substitutions/0000755000004100000410000000000013164166452023401 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/text_substitutions/entities.html0000644000004100000410000000026513164166452026116 0ustar www-datawww-data

This is the A&O. © 2008 by me As well \& as this. Some ŗ other values may ¯ may also show but not st. like &#xYZ;.

This is BS&T; done!

kramdown-1.15.0/test/testcases/span/text_substitutions/lowerthan.text0000644000004100000410000000001213164166452026303 0ustar www-datawww-data0 < 1 < 2 kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_char.html.190000644000004100000410000000007013164166452030020 0ustar www-datawww-data

This "is" 'the' A&O. © 2008 by me ŗ and λ

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_input.html0000644000004100000410000000010113164166452030005 0ustar www-datawww-data

This is the A&O. © 2008 by me ŗ and λ

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_char.html0000644000004100000410000000012713164166452027573 0ustar www-datawww-data

This "is" 'the' A&O. © 2008 by me ŗ and λ

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_char.text0000644000004100000410000000007213164166452027612 0ustar www-datawww-dataThis "is" 'the' A&O. © 2008 by me ŗ and λ kramdown-1.15.0/test/testcases/span/text_substitutions/greaterthan.html0000644000004100000410000000002713164166452026572 0ustar www-datawww-data

2 > 1 > 0

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_symbolic.text0000644000004100000410000000006613164166452030036 0ustar www-datawww-dataThis is the A&O. © 2008 by me ŗ and λ kramdown-1.15.0/test/testcases/span/text_substitutions/entities.text0000644000004100000410000000022713164166452026134 0ustar www-datawww-dataThis is the A&O. © 2008 by me As well \& as this. Some ŗ other values may ¯ may also show but not st. like &#xYZ;. This is BS&T; done! kramdown-1.15.0/test/testcases/span/text_substitutions/entities_numeric.text0000644000004100000410000000006613164166452027657 0ustar www-datawww-dataThis is the A&O. © 2008 by me ŗ and λ kramdown-1.15.0/test/testcases/span/text_substitutions/typography.options0000644000004100000410000000003113164166452027216 0ustar www-datawww-data:entity_output: symbolic kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_input.options0000644000004100000410000000003213164166452030537 0ustar www-datawww-data:entity_output: :as_input kramdown-1.15.0/test/testcases/span/text_substitutions/greaterthan.text0000644000004100000410000000001213164166452026604 0ustar www-datawww-data2 > 1 > 0 kramdown-1.15.0/test/testcases/span/text_substitutions/entities.options0000644000004100000410000000003213164166452026635 0ustar www-datawww-data:entity_output: :as_input kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_char.options0000644000004100000410000000007413164166452030323 0ustar www-datawww-data:entity_output: :as_char :smart_quotes: apos,apos,quot,quot kramdown-1.15.0/test/testcases/span/text_substitutions/lowerthan.html0000644000004100000410000000002713164166452026271 0ustar www-datawww-data

0 < 1 < 2

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_numeric.html0000644000004100000410000000010013164166452027624 0ustar www-datawww-data

This is the A&O. © 2008 by me ŗ and λ

kramdown-1.15.0/test/testcases/span/text_substitutions/typography.text0000644000004100000410000000122113164166452026511 0ustar www-datawww-dataThis is... something---this too--! This <> some text, << this >> too! "Fancy quotes" are 'cool', even in the '80s! Je t' aime. You're a funny one! Thomas' name Mark's name. "...you" "'Nested' quotes are 'possible'", too! '"Otherway" is "round"'! 'Opening now!' '80s are really cool. Cluster's Last Stand. Nam liber tempor "...At vero eos et accusam" "_Single underscores_ should work." "*Single asterisks* should work." '__Double underscores__ should work.' '**Double asterisks** should work.' "_Hurrah!_" '__Absolutely__.' "...some Text" "... some Text" This: "...some Text" This: "... some Text" "\[foo]" "\[foo]" d "\[foo]" kramdown-1.15.0/test/testcases/span/text_substitutions/entities_symbolic.options0000644000004100000410000000003213164166452030536 0ustar www-datawww-data:entity_output: :symbolic kramdown-1.15.0/test/testcases/span/text_substitutions/entities_symbolic.html0000644000004100000410000000010213164166452030005 0ustar www-datawww-data

This is the A&O. © 2008 by me ŗ and λ

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_as_input.text0000644000004100000410000000006613164166452030037 0ustar www-datawww-dataThis is the A&O. © 2008 by me ŗ and λ kramdown-1.15.0/test/testcases/span/text_substitutions/typography.html0000644000004100000410000000233413164166452026477 0ustar www-datawww-data

This is… something—this too–!

This «is» some text, « this » too!

“Fancy quotes” are ‘cool’, even in the ’80s! Je t’ aime. You’re a funny one! Thomas’ name Mark’s name. “…you” “‘Nested’ quotes are ‘possible’”, too! ‘“Otherway” is “round”’!

‘Opening now!’

’80s are really cool.

Cluster’s Last Stand.

Nam liber tempor “…At vero eos et accusam”

Single underscores should work.”

Single asterisks should work.”

Double underscores should work.’

Double asterisks should work.’

Hurrah!

Absolutely.’

“…some Text”

“… some Text”

This: “…some Text”

This: “… some Text”

”[foo]” “[foo]” d “[foo]”

kramdown-1.15.0/test/testcases/span/text_substitutions/entities_numeric.options0000644000004100000410000000003113164166452030356 0ustar www-datawww-data:entity_output: :numeric kramdown-1.15.0/test/testcases/span/line_breaks/0000755000004100000410000000000013164166452021654 5ustar www-datawww-datakramdown-1.15.0/test/testcases/span/line_breaks/normal.html0000644000004100000410000000026713164166452024037 0ustar www-datawww-data

This is a line
with a line break.

This is a line without a line break.

This is a line
with a line\
break.

Line break on last line.

kramdown-1.15.0/test/testcases/span/line_breaks/normal.latex0000644000004100000410000000026113164166452024202 0ustar www-datawww-dataThis is a line\newline with a line break. This is a line without a line break. This is a line \newline with a line\textbackslash{} \newline break. Line break on last line. kramdown-1.15.0/test/testcases/span/line_breaks/normal.text0000644000004100000410000000022413164166452024050 0ustar www-datawww-dataThis is a line with a line break. This is a line without a line break. This is a line \\ with a line\\ break. Line break on last line. kramdown-1.15.0/test/testcases/man/0000755000004100000410000000000013164166452017210 5ustar www-datawww-datakramdown-1.15.0/test/testcases/man/heading-name-section-description.text0000644000004100000410000000003113164166452026410 0ustar www-datawww-data# name(1) -- description kramdown-1.15.0/test/testcases/man/heading-name-description.text0000644000004100000410000000013713164166452024755 0ustar www-datawww-data# name description {: data-section="1" data-date="November 2016" data-extra="Something extra"} kramdown-1.15.0/test/testcases/man/text-escaping.man0000644000004100000410000000021213164166452022453 0ustar www-datawww-data.\" generated by kramdown \&\. at the start of the line .P line with \efB backslash symbol .P some \. other \- escaped \' symbols .P \&\. kramdown-1.15.0/test/testcases/man/sections.text0000644000004100000410000000011513164166452021742 0ustar www-datawww-data## NAME works ### Sub section #### Ignored ##### Ignored ###### Ignored kramdown-1.15.0/test/testcases/man/heading-name.man0000644000004100000410000000005113164166452022216 0ustar www-datawww-data.\" generated by kramdown .TH "NAME" "7" kramdown-1.15.0/test/testcases/man/example.text0000644000004100000410000000344013164166452021552 0ustar www-datawww-data# name(1) - description {: data-date="November 2016" data-extra="Some extra data"} ## SYNOPSIS `name` \[`OPTIONS`\] *arguments*... ## DESCRIPTION This is a normal paragraph. * A * compact * list * with multiple * items and * nested * as well {:.compact} > blockquotes are fine > > 1. numbered lists > > 2. work too > 1. and they > 2. can be > 1. nested > > 3. again ~~~ Some fancy code going on here ~~~ `-o` `--option` : Description lists : are useful as well And compact definition lists: `o` : Option `k` : Key `v` : Value {:.compact} | tables | can | be | centered | {:.center} |-----------------+------------+-----------------+----------------| | Default aligned |Left aligned| Center aligned | Right aligned | |-----------------|:-----------|:---------------:|---------------:| | First body part |Second cell | Third cell | fourth cell | | Second *line* |foo | **strong** | baz | | Third line |`quux` | baz | bar | |-----------------+------------+-----------------+----------------| | Second body | | | | | 2nd line | | | | |=================+============+=================+================| | Footer row one | | | | | Footer row two | | | | |-----------------+------------+-----------------+----------------| Inline formatting like *emphasis*, **strong** and `code span` work as ususal. [Links](are_well.html) work, too! As do\\ line breaks. Abbreviations like MD can be used but the abbreviation title is ignored. *[MD]: Markdown Math elements work $$\l = 5$$ inline and in block form: $$\lambda_5 = \alpha + 4$$ kramdown-1.15.0/test/testcases/man/example.man0000644000004100000410000000272713164166452021350 0ustar www-datawww-data.\" generated by kramdown .TH "NAME" "1" "November 2016" "Some extra data" .SH NAME name \- description .SH "SYNOPSIS" \fBname\fP [\fBOPTIONS\fP] \fIarguments\fP\.\.\. .SH "DESCRIPTION" This is a normal paragraph\. .sp .PD 0 .IP \(bu 4 A .IP \(bu 4 compact .IP \(bu 4 list .IP \(bu 4 with multiple .RS .IP \(bu 4 items and .RS .IP \(bu 4 nested .RE .RE .IP \(bu 4 as well .PD .RS .P blockquotes are fine .IP 1. 4 numbered lists .IP 2. 4 work too .RS .IP 1. 4 and they .IP 2. 4 can be .RS .IP 1. 4 nested .RE .RE .IP 3. 4 again .RE .sp .RS 4 .EX Some fancy code going on here .EE .RE .TP \fB\-o\fP .TQ \fB\-\-option\fP Description lists .sp are useful as well .P And compact definition lists: .sp .PD 0 .TP \fBo\fP Option .TP \fBk\fP Key .TP \fBv\fP Value .PD .TS box center ; l l l l . tables can be centered .TE .sp .TS box ; lb lb cb rb . Default aligned Left aligned Center aligned Right aligned = .T& l l c r . First body part Second cell Third cell fourth cell Second \fIline\fP foo \fBstrong\fP baz Third line \fBquux\fP baz bar _ .T& l l c r . Second body 2nd line = Footer row one Footer row two .TE .sp .P Inline formatting like \fIemphasis\fP, \fBstrong\fP and \fBcode span\fP work as ususal\. .UR are_well\.html Links .UE work, too! As do .br line breaks\. .P Abbreviations like MD can be used but the abbreviation title is ignored\. .P Math elements work \fB\el = 5\fP inline and in block form: .sp .RS 4 .EX \elambda_5 = \ealpha + 4 .EE .RE kramdown-1.15.0/test/testcases/man/heading-name-section.text0000644000004100000410000000001213164166452024066 0ustar www-datawww-data# name(1) kramdown-1.15.0/test/testcases/man/text-escaping.text0000644000004100000410000000014113164166452022665 0ustar www-datawww-data. at the start of the line line with \fB backslash symbol some . other - escaped \' symbols . kramdown-1.15.0/test/testcases/man/heading-name.text0000644000004100000410000000000713164166452022430 0ustar www-datawww-data# name kramdown-1.15.0/test/testcases/man/heading-name-dash-description.man0000644000004100000410000000010613164166452025455 0ustar www-datawww-data.\" generated by kramdown .TH "NAME" "7" .SH NAME name \- description kramdown-1.15.0/test/testcases/man/heading-name-dash-description.text0000644000004100000410000000002613164166452025667 0ustar www-datawww-data# name -- description kramdown-1.15.0/test/testcases/man/heading-name-section.man0000644000004100000410000000005113164166452023660 0ustar www-datawww-data.\" generated by kramdown .TH "NAME" "1" kramdown-1.15.0/test/testcases/man/sections.man0000644000004100000410000000007513164166452021536 0ustar www-datawww-data.\" generated by kramdown .SH "NAME" works .SS "Sub section" kramdown-1.15.0/test/testcases/man/heading-name-description.man0000644000004100000410000000015013164166452024537 0ustar www-datawww-data.\" generated by kramdown .TH "NAME" "1" "November 2016" "Something extra" .SH NAME name \- description kramdown-1.15.0/test/testcases/man/heading-name-section-description.man0000644000004100000410000000010613164166452026202 0ustar www-datawww-data.\" generated by kramdown .TH "NAME" "1" .SH NAME name \- description kramdown-1.15.0/test/testcases/block/0000755000004100000410000000000013164166452017527 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/11_ial/0000755000004100000410000000000013164166452020575 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/11_ial/nested.text0000644000004100000410000000014713164166452022767 0ustar www-datawww-data{:.cls}
test
{:#id} {:.cls}
test
{:#id} {:.cls} > para {:#id} kramdown-1.15.0/test/testcases/block/11_ial/auto_id_and_ial.options0000644000004100000410000000002013164166452025275 0ustar www-datawww-data:auto_ids: true kramdown-1.15.0/test/testcases/block/11_ial/nested.html0000644000004100000410000000022413164166452022743 0ustar www-datawww-data
test

test

para

kramdown-1.15.0/test/testcases/block/11_ial/auto_id_and_ial.html0000644000004100000410000000005013164166452024551 0ustar www-datawww-data

A header

kramdown-1.15.0/test/testcases/block/11_ial/simple.text0000644000004100000410000000074713164166452023004 0ustar www-datawww-dataSome paragraph. {:.class .-class id key="val"} Some paragraph. {:.cls1#id.cls2} > quote {: #id} {: .class} * list {: key="val"} code block {: #other} other code block ## A header {:#myid} {:.cls} Some paragraph here {:.cls1} {:.cls2} Some paragraph here Paragraph {:.cls} Paragraph Another header ============== {: .class #other} {:id: #id key="valo"} {:id: #other .myclass other} {:other: key1="val\"" - ig.nored as_is#this key2='val\'' .other-class} {:.invalid} kramdown-1.15.0/test/testcases/block/11_ial/simple.html0000644000004100000410000000107313164166452022755 0ustar www-datawww-data

Some paragraph.

Some paragraph.

quote

  • list
code block
other code block

A header

Some paragraph here

Some paragraph here

Paragraph

Paragraph

Another header

kramdown-1.15.0/test/testcases/block/11_ial/auto_id_and_ial.text0000644000004100000410000000003213164166452024571 0ustar www-datawww-data## A header {:#myid .cls} kramdown-1.15.0/test/testcases/block/16_toc/0000755000004100000410000000000013164166452020622 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/16_toc/no_toc.html0000644000004100000410000000030113164166452022763 0ustar www-datawww-data

Header level 1

Header level 2

Header level 3

Header level 4

Other header level 1

Other header level 2

Other header level 3

kramdown-1.15.0/test/testcases/block/16_toc/toc_with_links.html0000644000004100000410000000041713164166452024532 0ustar www-datawww-data

Header

Header

kramdown-1.15.0/test/testcases/block/16_toc/toc_exclude.options0000644000004100000410000000002013164166452024525 0ustar www-datawww-data:auto_ids: true kramdown-1.15.0/test/testcases/block/16_toc/toc_with_footnotes.options0000644000004100000410000000002013164166452026147 0ustar www-datawww-data:auto_ids: true kramdown-1.15.0/test/testcases/block/16_toc/toc_levels.text0000644000004100000410000000030713164166452023667 0ustar www-datawww-data* Here comes the table of content {:toc} # Header level 1 ## Header \\\` level 2 ### Header level 3 #### Header level 4 # Other header level 1 ## Other header level 2 ### Other header level 3 kramdown-1.15.0/test/testcases/block/16_toc/toc_levels.html0000644000004100000410000000147713164166452023660 0ustar www-datawww-data

Header level 1

Header \` level 2

Header level 3

Header level 4

Other header level 1

Other header level 2

Other header level 3

kramdown-1.15.0/test/testcases/block/16_toc/no_toc.text0000644000004100000410000000030213164166452023004 0ustar www-datawww-data* Here comes the table of content {:toc} # Header level 1 ## Header level 2 ### Header level 3 #### Header level 4 # Other header level 1 ## Other header level 2 ### Other header level 3 kramdown-1.15.0/test/testcases/block/16_toc/toc_exclude.text0000644000004100000410000000033113164166452024023 0ustar www-datawww-data# Contents {:.no_toc} * Here comes the table of content {:toc} # Header level 1 ## Header level 2 ### Header level 3 #### Header level 4 # Other header level 1 ## Other header level 2 ### Other header level 3 kramdown-1.15.0/test/testcases/block/16_toc/toc_exclude.html0000644000004100000410000000241613164166452024011 0ustar www-datawww-data

Contents

Header level 1

Header level 2

Header level 3

Header level 4

Other header level 1

Other header level 2

Other header level 3

kramdown-1.15.0/test/testcases/block/16_toc/toc_with_links.options0000644000004100000410000000005113164166452025253 0ustar www-datawww-data:auto_ids: true :auto_id_stripping: true kramdown-1.15.0/test/testcases/block/16_toc/toc_with_links.text0000644000004100000410000000007213164166452024547 0ustar www-datawww-data# [Header] # [Header] [header]: test.html * toc {:toc} kramdown-1.15.0/test/testcases/block/16_toc/toc_with_footnotes.text0000644000004100000410000000014113164166452025444 0ustar www-datawww-data* Here comes the table of content {:toc} # Header[^1] level 1 [^1]: Some footnote content here kramdown-1.15.0/test/testcases/block/16_toc/toc_levels.options0000644000004100000410000000004213164166452024372 0ustar www-datawww-data:toc_levels: 2..3 :auto_ids: true kramdown-1.15.0/test/testcases/block/16_toc/toc_with_footnotes.html0000644000004100000410000000062013164166452025426 0ustar www-datawww-data

Header1 level 1

  1. Some footnote content here 

kramdown-1.15.0/test/testcases/block/09_html/0000755000004100000410000000000013164166452021003 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/09_html/parse_block_html.text0000644000004100000410000000021113164166452025213 0ustar www-datawww-data
test
test
test
code block with
No matching end tag kramdown-1.15.0/test/testcases/block/09_html/parse_block_html.html0000644000004100000410000000035513164166452025204 0ustar www-datawww-data

test

test
test
code block with </div>

No matching end tag

kramdown-1.15.0/test/testcases/block/09_html/html_after_block.text0000644000004100000410000000012013164166452025201 0ustar www-datawww-dataPara
division
> Quote
division
kramdown-1.15.0/test/testcases/block/09_html/html_and_codeblocks.options0000644000004100000410000000003013164166452026367 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/parse_as_span.htmlinput0000644000004100000410000000024513164166452025570 0ustar www-datawww-data

This text should be parsed as span

This produces `

` an unwanted result.</p>

This text too

some text

kramdown-1.15.0/test/testcases/block/09_html/processing_instruction.html0000644000004100000410000000015613164166452026510 0ustar www-datawww-data

para

para

other

kramdown-1.15.0/test/testcases/block/09_html/parse_as_span.text0000644000004100000410000000020313164166452024522 0ustar www-datawww-data

This *text should* be parsed as span

This produces `

` an unwanted result.

This *text* too

some text kramdown-1.15.0/test/testcases/block/09_html/invalid_html_1.html0000644000004100000410000000005613164166452024564 0ustar www-datawww-data

para

</div>

para

kramdown-1.15.0/test/testcases/block/09_html/simple.html.190000644000004100000410000000101613164166452023410 0ustar www-datawww-data

test

para2

tes

test weiter

para4

foo

bar 

para5

id

test

hallo

hallo

para6

Another para.

Test

Test

Test

kramdown-1.15.0/test/testcases/block/09_html/html_after_block.html0000644000004100000410000000017113164166452025167 0ustar www-datawww-data

Para

division

Quote

division
kramdown-1.15.0/test/testcases/block/09_html/markdown_attr.text0000644000004100000410000000053413164166452024567 0ustar www-datawww-data
*para*
*para*
*para*
*para*

*para*

*para*

*para*

*para*

*emphasize*
para
kramdown-1.15.0/test/testcases/block/09_html/html_and_headers.text0000644000004100000410000000004313164166452025167 0ustar www-datawww-dataheader ======
======
kramdown-1.15.0/test/testcases/block/09_html/textarea.html0000644000004100000410000000012713164166452023506 0ustar www-datawww-data

This is a

kramdown-1.15.0/test/testcases/block/09_html/simple.text0000644000004100000410000000063113164166452023202 0ustar www-datawww-data
test

para2

tes

test weiter

para4
foo
bar 
para5
id
test
hallo
hallo
para6
Another para.
Test

Test

Test

kramdown-1.15.0/test/testcases/block/09_html/parse_as_raw.html0000644000004100000410000000104613164166452024340 0ustar www-datawww-data

baz { |qux| quux }

This is some para.

parsed This too

http://example.com

kramdown-1.15.0/test/testcases/block/09_html/invalid_html_2.html0000644000004100000410000000004113164166452024557 0ustar www-datawww-data

para


para

kramdown-1.15.0/test/testcases/block/09_html/simple.html0000644000004100000410000000102213164166452023155 0ustar www-datawww-data

test

para2

tes

test weiter

para4

foo

bar 

para5

id

test

hallo

hallo

para6

Another para.

Test

Test

Test

kramdown-1.15.0/test/testcases/block/09_html/parse_as_raw.text0000644000004100000410000000076013164166452024362 0ustar www-datawww-data

baz { |qux| quux }

This is some para.

*parsed* This too

kramdown-1.15.0/test/testcases/block/09_html/simple.options0000644000004100000410000000003013164166452023702 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/xml.text0000644000004100000410000000021113164166452022503 0ustar www-datawww-data doit doit doit kramdown-1.15.0/test/testcases/block/09_html/html5_attributes.text0000644000004100000410000000045313164166452025212 0ustar www-datawww-data

paragraph

paragraph

paragraph

paragraph

paragraph

paragraph

paragraph

kramdown-1.15.0/test/testcases/block/09_html/comment.text0000644000004100000410000000015013164166452023347 0ustar www-datawww-data para1 para2 para > This is > kramdown-1.15.0/test/testcases/block/09_html/comment.html0000644000004100000410000000023513164166452023333 0ustar www-datawww-data

para1

para2

para

This is

kramdown-1.15.0/test/testcases/block/09_html/html_and_codeblocks.text0000644000004100000410000000012413164166452025664 0ustar www-datawww-datapara codeblock
test

codeblock

test
kramdown-1.15.0/test/testcases/block/09_html/not_parsed.text0000644000004100000410000000033113164166452024044 0ustar www-datawww-data
This is some text
This is some text

Foo

This is some text

kramdown-1.15.0/test/testcases/block/09_html/processing_instruction.text0000644000004100000410000000013113164166452026521 0ustar www-datawww-data para para other kramdown-1.15.0/test/testcases/block/09_html/parse_block_html.options0000644000004100000410000000003013164166452025721 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/html_and_codeblocks.html0000644000004100000410000000023713164166452025651 0ustar www-datawww-data

para

codeblock

test

<p>codeblock</p>

test

kramdown-1.15.0/test/testcases/block/09_html/parse_as_span.options0000644000004100000410000000003013164166452025227 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/markdown_attr.html0000644000004100000410000000044513164166452024550 0ustar www-datawww-data

para

para

para

*para*

para

para

para

*para*

emphasize

para

kramdown-1.15.0/test/testcases/block/09_html/content_model/0000755000004100000410000000000013164166452023635 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/09_html/content_model/tables.text0000644000004100000410000000030013164166452026006 0ustar www-datawww-data
*Usage* Output
Some *data* # Some more
kramdown-1.15.0/test/testcases/block/09_html/content_model/tables.options0000644000004100000410000000003013164166452026515 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/content_model/deflists.options0000644000004100000410000000003013164166452027060 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/content_model/tables.html0000644000004100000410000000027713164166452026003 0ustar www-datawww-data
Usage Output
Some data

Some more

kramdown-1.15.0/test/testcases/block/09_html/content_model/deflists.html0000644000004100000410000000010313164166452026332 0ustar www-datawww-data
text

para

kramdown-1.15.0/test/testcases/block/09_html/content_model/deflists.text0000644000004100000410000000005313164166452026356 0ustar www-datawww-data
*text*
para
kramdown-1.15.0/test/testcases/block/09_html/textarea.text0000644000004100000410000000012013164166452023517 0ustar www-datawww-dataThis is a kramdown-1.15.0/test/testcases/block/09_html/parse_as_raw.htmlinput0000644000004100000410000000104513164166452025417 0ustar www-datawww-data

baz { |qux| quux }

This is some para.

parsed This too

http://example.com

kramdown-1.15.0/test/testcases/block/09_html/xml.html0000644000004100000410000000022713164166452022472 0ustar www-datawww-data doit doit doit</some> kramdown-1.15.0/test/testcases/block/09_html/invalid_html_2.text0000644000004100000410000000002113164166452024575 0ustar www-datawww-datapara
para kramdown-1.15.0/test/testcases/block/09_html/invalid_html_1.text0000644000004100000410000000002313164166452024576 0ustar www-datawww-datapara
para kramdown-1.15.0/test/testcases/block/09_html/html_and_headers.html0000644000004100000410000000004513164166452025151 0ustar www-datawww-data

header

======
kramdown-1.15.0/test/testcases/block/09_html/parse_as_span.html0000644000004100000410000000024513164166452024510 0ustar www-datawww-data

This text should be parsed as span

This produces `

` an unwanted result.</p>

This text too

some text

kramdown-1.15.0/test/testcases/block/09_html/html5_attributes.html0000644000004100000410000000047613164166452025177 0ustar www-datawww-data

paragraph

paragraph

paragraph

paragraph

paragraph

paragraph

paragraph

kramdown-1.15.0/test/testcases/block/09_html/not_parsed.html0000644000004100000410000000041313164166452024025 0ustar www-datawww-data
This is some text
This is some text
</p>

Foo

This is some text

http://example.com

<http://example.com>
kramdown-1.15.0/test/testcases/block/09_html/parse_as_raw.options0000644000004100000410000000003013164166452025057 0ustar www-datawww-data:parse_block_html: true kramdown-1.15.0/test/testcases/block/09_html/html_to_native/0000755000004100000410000000000013164166452024017 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/09_html/html_to_native/table_simple.text0000644000004100000410000000135113164166452027365 0ustar www-datawww-data
Usage Output
Some *data* Some more
Usage Output
Some *data* Some more
foot locker
Usage Output
Some *data* Some more
Usage Output
Some *data* Some more
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/options0000644000004100000410000000002613164166452025433 0ustar www-datawww-data:html_to_native: true kramdown-1.15.0/test/testcases/block/09_html/html_to_native/list_dl.html0000644000004100000410000000015313164166452026336 0ustar www-datawww-data
kram
down
kram
down
kram
down
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/paragraph.html0000644000004100000410000000011013164166452026642 0ustar www-datawww-data

Some text here and end

Some other text here

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/code.html0000644000004100000410000000040513164166452025616 0ustar www-datawww-data

This is a code span with <entities> that should be preserved. This is a simple code span.

Some <

Some very important < thing
Some code<<
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/code.text0000644000004100000410000000041313164166452025635 0ustar www-datawww-dataThis is a code span with <entities> that should be preserved. This is a simple code span.

Some <

Some very important < thing
Some code<<
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/paragraph.text0000644000004100000410000000011113164166452026663 0ustar www-datawww-data

Some text here and end

Some other text here

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/emphasis.text0000644000004100000410000000022113164166452026531 0ustar www-datawww-dataThis is sizedhallo. This is strongitalic, yes!. This is not converted, as is this. kramdown-1.15.0/test/testcases/block/09_html/html_to_native/header.options0000644000004100000410000000004613164166452026664 0ustar www-datawww-data:auto_ids: true :html_to_native: true kramdown-1.15.0/test/testcases/block/09_html/html_to_native/comment.text0000644000004100000410000000006413164166452026367 0ustar www-datawww-data
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/comment.html0000644000004100000410000000006313164166452026346 0ustar www-datawww-data
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/header.html0000644000004100000410000000031313164166452026132 0ustar www-datawww-data

Some headerhere!

hallo

hallo

hallo

hallo
hallo
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/header.text0000644000004100000410000000020413164166452026151 0ustar www-datawww-data

Some headerhere!

hallo

hallo

hallo

hallo
hallo
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/entity.text0000644000004100000410000000007113164166452026237 0ustar www-datawww-data

This is *raw* HTML text containing < entities!

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/entity.html0000644000004100000410000000007113164166452026217 0ustar www-datawww-data

This is *raw* HTML text containing < entities!

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/table_simple.html0000644000004100000410000000156313164166452027352 0ustar www-datawww-data
Usage Output
Some *data* Some more
Usage Output
Some *data* Some more
foot locker
Usage Output
Some *data* Some more
Usage Output
Some *data* Some more
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/typography.html.190000644000004100000410000000006013164166452027337 0ustar www-datawww-data

This is … something “to remember”!

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/list_ul.text0000644000004100000410000000043313164166452026400 0ustar www-datawww-data
  • This is a simple list item
  • Followed by another

  • Followed by

    a para list item

  • and a normal one
  • and

    a para

  • multi line list item
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/list_ol.html0000644000004100000410000000035513164166452026355 0ustar www-datawww-data
  1. This is a simple list item
  2. Followed by another

  3. Followed by

    a para list item

  4. and a normal one
  5. and

    a para

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/emphasis.html0000644000004100000410000000026213164166452026516 0ustar www-datawww-data

This is sizedhallo.

This is strongitalic, yes!.

This is not converted, as is this.

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/list_ul.html0000644000004100000410000000043113164166452026356 0ustar www-datawww-data
  • This is a simple list item
  • Followed by another

  • Followed by

    a para list item

  • and a normal one
  • and

    a para

  • multi line list item
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/list_dl.text0000644000004100000410000000015313164166452026356 0ustar www-datawww-data
kram
down
kram
down
kram
down
kramdown-1.15.0/test/testcases/block/09_html/html_to_native/typography.text0000644000004100000410000000007513164166452027135 0ustar www-datawww-data

This is … something “to remember”!

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/list_ol.text0000644000004100000410000000035713164166452026377 0ustar www-datawww-data
  1. This is a simple list item
  2. Followed by another

  3. Followed by

    a para list item

  4. and a normal one
  5. and

    a para

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/table_normal.html0000644000004100000410000000022513164166452027343 0ustar www-datawww-data
Usage Other
Some *data*

Some more

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/table_normal.text0000644000004100000410000000022513164166452027363 0ustar www-datawww-data
Usage Other
Some *data*

Some more

kramdown-1.15.0/test/testcases/block/09_html/html_to_native/typography.html0000644000004100000410000000007413164166452027114 0ustar www-datawww-data

This is … something “to remember”!

kramdown-1.15.0/test/testcases/block/08_list/0000755000004100000410000000000013164166452021011 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/08_list/item_ial.text0000644000004100000410000000027613164166452023507 0ustar www-datawww-data* {:.cls} IAL at first continued * another {:.cls} * {:.cls} IAL at last code * {::nomarkdown type="html"}X{:/nomarkdown} test * {::nomarkdown type="html"}X{:/nomarkdown} OK kramdown-1.15.0/test/testcases/block/08_list/mixed.html0000644000004100000410000000244313164166452023010 0ustar www-datawww-data

With tabs/spaces, no paras:

  • item1
  • item2
  • item3

With tabs/spaces, paras:

  • item1

  • item2

  • item3

With tabs/spaces, no paras:

  1. item1
  2. item2
  3. item3

With tabs/spaces, paras:

  1. item1

  2. item2

  3. item3

Nested, without paras:

  • item1
    • item2
      • item3

Nested, with paras:

  • item1

    • item2
      • item3 (level 3)

Ordered, without paras:

  1. item1
  2. item2
    • do
    • it
    • now
  3. item3

Ordered, with paras:

  1. item1

  2. item2

    • do
    • it
    • now
  3. item3

Mixed tabs and spaces:

  • some text
    • nested
kramdown-1.15.0/test/testcases/block/08_list/other_first_element.text0000644000004100000410000000041113164166452025754 0ustar www-datawww-data* This is a code block. * > This is a blockquote. * ## A header ^ * This is a code block. * > This is a blockquote. continued by some para. * A header ========= a para ^ * * nested list * other nested item * item 2 kramdown-1.15.0/test/testcases/block/08_list/single_item.html0000644000004100000410000000003513164166452024174 0ustar www-datawww-data
  • single
kramdown-1.15.0/test/testcases/block/08_list/escaping.html0000644000004100000410000000044213164166452023470 0ustar www-datawww-data

I have read the book 1984. It was great - other say that, too!

I have read the book 1984. It was great - other say that, too!

I have read the book 1984. It was great.

I have read the book 1984. - it was great!

1984. Was great!

- This too!

kramdown-1.15.0/test/testcases/block/08_list/nested.text0000644000004100000410000000007613164166452023204 0ustar www-datawww-data* some item * nested * last item ^ * some text * nested kramdown-1.15.0/test/testcases/block/08_list/special_cases.html0000644000004100000410000000132313164166452024474 0ustar www-datawww-data
  • not a para here

    blockquote

  • and not here

    blockquote

  • this is a para

  • blockquote

  • this too

A paragraph 1. followed not by ol - followed not by ul

A compact list:

  • compact
  • list
  • items

A normal list:

  • not

  • compact

  • but here

List item without content:

  • a
kramdown-1.15.0/test/testcases/block/08_list/escaping.text0000644000004100000410000000037413164166452023514 0ustar www-datawww-dataI have read the book 1984. It was great - other say that, too! I have read the book 1984\. It was great \- other say that, too! I have read the book 1984. It was great. I have read the book 1984. - it was great! 1984\. Was great! \- This too! kramdown-1.15.0/test/testcases/block/08_list/nested.html0000644000004100000410000000027213164166452023162 0ustar www-datawww-data
  • some item
    • nested
  • last item
  • some text

    • nested
kramdown-1.15.0/test/testcases/block/08_list/lazy_and_nested.text0000644000004100000410000000011213164166452025054 0ustar www-datawww-data1. Root level * Second level * Third level * Back to second level kramdown-1.15.0/test/testcases/block/08_list/simple_ul.html0000644000004100000410000000104213164166452023665 0ustar www-datawww-data
  • This is a simple list item
  • Followed by another

  • Followed by

    a para list item

  • and a normal one
  • and

    a para

para

  • multi line list item

para

  • list item line1 one line two lines
  • list item line2 one line two lines

para

  • list item line3 one line two lines
  • list item line4 one line two lines

para

kramdown-1.15.0/test/testcases/block/08_list/simple_ol.text0000644000004100000410000000021213164166452023675 0ustar www-datawww-data1. This is a simple list item 3. Followed by another 10. Followed by a para list item 1. and a normal one 2. and a para para kramdown-1.15.0/test/testcases/block/08_list/brackets_in_item.latex0000644000004100000410000000007013164166452025347 0ustar www-datawww-data\begin{itemize} \item{} {[}and{]} another \end{itemize} kramdown-1.15.0/test/testcases/block/08_list/list_and_hr.text0000644000004100000410000000006013164166452024201 0ustar www-datawww-data* Starting a list * * * * Starting a new list kramdown-1.15.0/test/testcases/block/08_list/mixed.text0000644000004100000410000000106713164166452023031 0ustar www-datawww-dataWith tabs/spaces, no paras: * item1 + item2 - item3 With tabs/spaces, paras: - item1 * item2 + item3 With tabs/spaces, no paras: 1. item1 20. item2 3. item3 With tabs/spaces, paras: 1. item1 2. item2 3. item3 Nested, without paras: * item1 * item2 * item3 Nested, with paras: + item1 * item2 * item3 (level 3) Ordered, without paras: 1. item1 2. item2 * do * it * now 3. item3 Ordered, with paras: 1. item1 2. item2 * do * it * now 3. item3 Mixed tabs and spaces: * some text * nested kramdown-1.15.0/test/testcases/block/08_list/list_and_others.html0000644000004100000410000000063313164166452025062 0ustar www-datawww-data
  • list item

blockquote

para * * * para - no list

  • item

    block

    header

  • test

    codeblock
    

    test

  • test

    codeblock
    

    test

kramdown-1.15.0/test/testcases/block/08_list/lazy_and_nested.html0000644000004100000410000000020013164166452025032 0ustar www-datawww-data
  1. Root level * Second level
    • Third level * Back to second level
kramdown-1.15.0/test/testcases/block/08_list/list_and_hr.html0000644000004100000410000000013113164166452024160 0ustar www-datawww-data
  • Starting a list

  • Starting a new list
kramdown-1.15.0/test/testcases/block/08_list/simple_ol.html0000644000004100000410000000037413164166452023666 0ustar www-datawww-data
  1. This is a simple list item
  2. Followed by another

  3. Followed by

    a para list item

  4. and a normal one
  5. and

    a para

para

kramdown-1.15.0/test/testcases/block/08_list/simple_ul.text0000644000004100000410000000055013164166452023710 0ustar www-datawww-data* This is a simple list item * Followed by another * Followed by a para list item * and a normal one * and a para para * multi line list item para * list item line1 one line two lines * list item line2 one line two lines para * list item line3 one line two lines * list item line4 one line two lines para kramdown-1.15.0/test/testcases/block/08_list/special_cases.text0000644000004100000410000000046313164166452024520 0ustar www-datawww-data* not a para here > blockquote * and not here >blockquote * this is a para * > blockquote * this too ^ A paragraph 1. followed not by ol - followed not by ul A compact list: * compact * list * items A normal list: * not * compact * but here List item without content: * * a kramdown-1.15.0/test/testcases/block/08_list/lazy.text0000644000004100000410000000043513164166452022700 0ustar www-datawww-data* This is a simple list item * Followed by another list item * Followed by a para list item continued here * and a normal one * and a para continued here para * multi line list item para * list item line1 one line two lines * list item line2 one line two lines kramdown-1.15.0/test/testcases/block/08_list/list_and_others.text0000644000004100000410000000022413164166452025076 0ustar www-datawww-data* list item > blockquote para * * * para - no list + item > block ## header * test codeblock test * test codeblock test kramdown-1.15.0/test/testcases/block/08_list/single_item.text0000644000004100000410000000001113164166452024206 0ustar www-datawww-data* single kramdown-1.15.0/test/testcases/block/08_list/brackets_in_item.text0000644000004100000410000000002213164166452025213 0ustar www-datawww-data* \[and\] another kramdown-1.15.0/test/testcases/block/08_list/lazy.html0000644000004100000410000000071013164166452022654 0ustar www-datawww-data
  • This is a simple list item
  • Followed by another list item

  • Followed by

    a para list item continued here

  • and a normal one
  • and

    a para continued here

para

  • multi line list item

para

  • list item line1 one line two lines
  • list item line2 one line two lines
kramdown-1.15.0/test/testcases/block/08_list/item_ial.html0000644000004100000410000000024413164166452023462 0ustar www-datawww-data
  • IAL at first continued
  • another {:.cls}
  • IAL at last code
  • X test
  • X OK
kramdown-1.15.0/test/testcases/block/08_list/other_first_element.html0000644000004100000410000000106313164166452025740 0ustar www-datawww-data
  • This is a code block.
    
  • This is a blockquote.

  • A header

  • This is a code block.
    
  • This is a blockquote. continued by some para.

  • A header

    a para

    • nested list
    • other nested item
  • item 2
kramdown-1.15.0/test/testcases/block/15_math/0000755000004100000410000000000013164166452020765 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/15_math/mathjaxnode.html.190000644000004100000410000000073513164166452024412 0ustar www-datawww-data f ( x ) = a x 3 + b x 2 + c x + d kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode_notexhints.html.190000644000004100000410000000056713164166452026700 0ustar www-datawww-data f ( x ) = a x 3 + b x 2 + c x + d kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview_simple.html0000644000004100000410000000031113164166452026414 0ustar www-datawww-data

This is a math statement

math
kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode.text0000644000004100000410000000004413164166452024173 0ustar www-datawww-data$$f(x) = a{x^3} + b{x^2} + cx + d$$ kramdown-1.15.0/test/testcases/block/15_math/itex2mml.html0000644000004100000410000000067313164166452023422 0ustar www-datawww-dataf(x)=ax 3+bx 2+cx+df(x) = a{x^3} + b{x^2} + cx + d kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode.options0000644000004100000410000000003213164166452024677 0ustar www-datawww-data:math_engine: mathjaxnode kramdown-1.15.0/test/testcases/block/15_math/normal.html0000644000004100000410000000133613164166452023146 0ustar www-datawww-data

This is a para.

This is a para.

$$5+5$$
kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview.text0000644000004100000410000000005313164166452025066 0ustar www-datawww-dataThis is a $$5 + 5$$ statement $$ 5 + 5 $$ kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode_notexhints.options0000644000004100000410000000010013164166452027156 0ustar www-datawww-data:math_engine: mathjaxnode :math_engine_opts: :texhints: false kramdown-1.15.0/test/testcases/block/15_math/gh_128.html0000644000004100000410000000012713164166452022643 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/15_math/ritex.html0000644000004100000410000000051113164166452023003 0ustar www-datawww-dataf(x)=ax3+bx2+cx+d kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode_semantics.options0000644000004100000410000000010013164166452026741 0ustar www-datawww-data:math_engine: mathjaxnode :math_engine_opts: :semantics: true kramdown-1.15.0/test/testcases/block/15_math/gh_128.text0000644000004100000410000000007713164166452022667 0ustar www-datawww-data$$ $$ kramdown-1.15.0/test/testcases/block/15_math/itex2mml.options0000644000004100000410000000002713164166452024142 0ustar www-datawww-data:math_engine: itex2mml kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview_simple.text0000644000004100000410000000005313164166452026437 0ustar www-datawww-dataThis is a $$5 + 5$$ statement $$ 5 + 5 $$ kramdown-1.15.0/test/testcases/block/15_math/itex2mml.text0000644000004100000410000000004413164166452023432 0ustar www-datawww-data$$f(x) = a{x^3} + b{x^2} + cx + d$$ kramdown-1.15.0/test/testcases/block/15_math/ritex.text0000644000004100000410000000004413164166452023024 0ustar www-datawww-data$$f(x) = a{x^3} + b{x^2} + cx + d$$ kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode_semantics.text0000644000004100000410000000004413164166452026241 0ustar www-datawww-data$$f(x) = a{x^3} + b{x^2} + cx + d$$ kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview_simple.options0000644000004100000410000000004613164166452027150 0ustar www-datawww-data:math_engine_opts: :preview: 'math' kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview_as_code.text0000644000004100000410000000005313164166452026543 0ustar www-datawww-dataThis is a $$5 + 5$$ statement $$ 5 + 5 $$ kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview.options0000644000004100000410000000004413164166452025575 0ustar www-datawww-data:math_engine_opts: :preview: true kramdown-1.15.0/test/testcases/block/15_math/normal.text0000644000004100000410000000041113164166452023157 0ustar www-datawww-dataThis is a para. $$ \text{LaTeX} \lambda_5 $$ $$\lambda_5 = \alpha + 4$$ $$\lambda_\alpha > 5$$ This is a para. $$\begin{align*} &=5 \\ &=6 \\ \end{align*}$$ $$5+5$$ $$5+5$$ $$5+5$$ $$5+5$$ $$5+5$$ {:.cls} $$5+5$$ ^ $$5+5$$ {:.cls} $$|x| = 5$$ kramdown-1.15.0/test/testcases/block/15_math/no_engine.html0000644000004100000410000000006113164166452023611 0ustar www-datawww-data
$$ 5+5 $$
kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview.html0000644000004100000410000000031313164166452025045 0ustar www-datawww-data

This is a 5 + 5 statement

5 + 5
kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode_semantics.html.190000644000004100000410000000131713164166452026455 0ustar www-datawww-data f ( x ) = a x 3 + b x 2 + c x + d f(x) = a{x^3} + b{x^2} + cx + d kramdown-1.15.0/test/testcases/block/15_math/no_engine.text0000644000004100000410000000002513164166452023631 0ustar www-datawww-data{: #math-id} $$5+5$$ kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview_as_code.options0000644000004100000410000000007513164166452027256 0ustar www-datawww-data:math_engine_opts: :preview: true :preview_as_code: true kramdown-1.15.0/test/testcases/block/15_math/mathjaxnode_notexhints.text0000644000004100000410000000004413164166452026456 0ustar www-datawww-data$$f(x) = a{x^3} + b{x^2} + cx + d$$ kramdown-1.15.0/test/testcases/block/15_math/mathjax_preview_as_code.html0000644000004100000410000000033013164166452026521 0ustar www-datawww-data

This is a 5 + 5 statement

5 + 5
kramdown-1.15.0/test/testcases/block/15_math/no_engine.options0000644000004100000410000000002013164166452024333 0ustar www-datawww-data:math_engine: ~ kramdown-1.15.0/test/testcases/block/15_math/ritex.options0000644000004100000410000000002413164166452023531 0ustar www-datawww-data:math_engine: ritex kramdown-1.15.0/test/testcases/block/13_definition_list/0000755000004100000410000000000013164166452023215 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/13_definition_list/item_ial.text0000644000004100000410000000032213164166452025703 0ustar www-datawww-dataitem : {:.cls} definition continued : another {:.cls} : {:.class} code : {:.cls} IAL at last no code bc of text {:.class} term : definition {:.class1} term1 {:.class2} term2 : definition kramdown-1.15.0/test/testcases/block/13_definition_list/para_wrapping.text0000644000004100000410000000005613164166452026756 0ustar www-datawww-dataterm : definition : definition : definition kramdown-1.15.0/test/testcases/block/13_definition_list/auto_ids.text0000644000004100000410000000015013164166452025726 0ustar www-datawww-data{:auto_ids} item : def item2 : def ^ {:auto_ids-prefix-} item : def item2 : def {:#id} item3 : def kramdown-1.15.0/test/testcases/block/13_definition_list/para_wrapping.html0000644000004100000410000000017313164166452026736 0ustar www-datawww-data
term

definition

definition

definition

kramdown-1.15.0/test/testcases/block/13_definition_list/multiple_terms.text0000644000004100000410000000011713164166452027167 0ustar www-datawww-datakram *down* now : definition 1 : definition 2 : definition 3 : definition 4 kramdown-1.15.0/test/testcases/block/13_definition_list/separated_by_eob.text0000644000004100000410000000003213164166452027405 0ustar www-datawww-datakram : down ^ kram : down kramdown-1.15.0/test/testcases/block/13_definition_list/deflist_ial.text0000644000004100000410000000006313164166452026401 0ustar www-datawww-data{:.dl-horizontal} item : definition {:.dl-other} kramdown-1.15.0/test/testcases/block/13_definition_list/simple.text0000644000004100000410000000006313164166452025413 0ustar www-datawww-datakram : down novalue : kram : down kram : down kramdown-1.15.0/test/testcases/block/13_definition_list/with_blocks.html0000644000004100000410000000075413164166452026421 0ustar www-datawww-data
kram
this is some text

this is some more text

kram

blockquote

kram
code
kram
kram
down
kram

header

kram
  • list
  • items
kramdown-1.15.0/test/testcases/block/13_definition_list/simple.html0000644000004100000410000000017713164166452025401 0ustar www-datawww-data
kram
down
novalue
kram
down kram
down
kramdown-1.15.0/test/testcases/block/13_definition_list/too_much_space.html0000644000004100000410000000004413164166452027071 0ustar www-datawww-data

para

: no definition

kramdown-1.15.0/test/testcases/block/13_definition_list/separated_by_eob.html0000644000004100000410000000012613164166452027371 0ustar www-datawww-data
kram
down
kram
down
kramdown-1.15.0/test/testcases/block/13_definition_list/with_blocks.text0000644000004100000410000000025013164166452026430 0ustar www-datawww-datakram : this is some text : this is some more text kram : > blockquote kram : code kram : kram : down kram : # header kram : * list * items kramdown-1.15.0/test/testcases/block/13_definition_list/too_much_space.text0000644000004100000410000000002713164166452027112 0ustar www-datawww-datapara : no definition kramdown-1.15.0/test/testcases/block/13_definition_list/auto_ids.html0000644000004100000410000000036513164166452025716 0ustar www-datawww-data
item
def
item2
def
item
def
item2
def
item3
def
kramdown-1.15.0/test/testcases/block/13_definition_list/definition_at_beginning.html0000644000004100000410000000002713164166452030736 0ustar www-datawww-data

: no definition

kramdown-1.15.0/test/testcases/block/13_definition_list/deflist_ial.html0000644000004100000410000000012013164166452026353 0ustar www-datawww-data
item
definition
kramdown-1.15.0/test/testcases/block/13_definition_list/no_def_list.text0000644000004100000410000000005413164166452026407 0ustar www-datawww-dataThis is a para \: and not a definition list kramdown-1.15.0/test/testcases/block/13_definition_list/styled_terms.text0000644000004100000410000000001613164166452026636 0ustar www-datawww-data*kram* : down kramdown-1.15.0/test/testcases/block/13_definition_list/item_ial.html0000644000004100000410000000054513164166452025672 0ustar www-datawww-data
item
definition continued
another {:.cls}
code
IAL at last no code bc of text
term
definition
term1
term2
definition
kramdown-1.15.0/test/testcases/block/13_definition_list/no_def_list.html0000644000004100000410000000006213164166452026366 0ustar www-datawww-data

This is a para : and not a definition list

kramdown-1.15.0/test/testcases/block/13_definition_list/multiple_terms.html0000644000004100000410000000030113164166452027142 0ustar www-datawww-data
kram
down
now
definition 1
definition 2

definition 3

definition 4

kramdown-1.15.0/test/testcases/block/13_definition_list/styled_terms.html0000644000004100000410000000006413164166452026621 0ustar www-datawww-data
kram
down
kramdown-1.15.0/test/testcases/block/13_definition_list/definition_at_beginning.text0000644000004100000410000000002013164166452030747 0ustar www-datawww-data: no definition kramdown-1.15.0/test/testcases/block/07_horizontal_rule/0000755000004100000410000000000013164166452023255 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/07_horizontal_rule/normal.html0000644000004100000410000000022013164166452025425 0ustar www-datawww-data


d- -




para

text


- - -

kramdown-1.15.0/test/testcases/block/07_horizontal_rule/error.html.190000644000004100000410000000015113164166452025521 0ustar www-datawww-data

_ * _

— * * *

_ - *

———————————————- test

kramdown-1.15.0/test/testcases/block/07_horizontal_rule/error.html0000644000004100000410000000025113164166452025272 0ustar www-datawww-data

_ * _

— * * *

_ - *

———————————————- test

kramdown-1.15.0/test/testcases/block/07_horizontal_rule/sepspaces.text0000644000004100000410000000004513164166452026150 0ustar www-datawww-data- - - * * * _ _ _ _ _ kramdown-1.15.0/test/testcases/block/07_horizontal_rule/error.text0000644000004100000410000000011513164166452025311 0ustar www-datawww-data_ * _ --- * * * _ - * ---------------------------------------------- test kramdown-1.15.0/test/testcases/block/07_horizontal_rule/sepspaces.html0000644000004100000410000000002513164166452026126 0ustar www-datawww-data


kramdown-1.15.0/test/testcases/block/07_horizontal_rule/normal.text0000644000004100000410000000014013164166452025446 0ustar www-datawww-data*** * * * - - - d- - --- ___ *** para ----------- text * * * - - - * * * {:.test} kramdown-1.15.0/test/testcases/block/07_horizontal_rule/septabs.text0000644000004100000410000000003313164166452025620 0ustar www-datawww-data- - - * * * _ _ _ _ _ kramdown-1.15.0/test/testcases/block/07_horizontal_rule/septabs.html0000644000004100000410000000002513164166452025601 0ustar www-datawww-data


kramdown-1.15.0/test/testcases/block/04_header/0000755000004100000410000000000013164166452021262 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/04_header/with_auto_ids.options0000644000004100000410000000006113164166452025536 0ustar www-datawww-data:auto_ids: true :transliterated_header_ids: true kramdown-1.15.0/test/testcases/block/04_header/with_auto_id_prefix.html0000644000004100000410000000010713164166452026202 0ustar www-datawww-data

Header 1

123

kramdown-1.15.0/test/testcases/block/04_header/header_type_offset.options0000644000004100000410000000004213164166452026532 0ustar www-datawww-data:header_offset: 1 :auto_ids: falsekramdown-1.15.0/test/testcases/block/04_header/with_auto_id_prefix.options0000644000004100000410000000005013164166452026726 0ustar www-datawww-data:auto_ids: true :auto_id_prefix: hallo_ kramdown-1.15.0/test/testcases/block/04_header/setext_header.html0000644000004100000410000000056213164166452024777 0ustar www-datawww-data

test

test2

test

para

   header =

=

This is a para. With two lines. And not a header. =================

Blockquote. Not a Header -

header

header

header

header{#noid}

header

kramdown-1.15.0/test/testcases/block/04_header/with_auto_id_prefix.text0000644000004100000410000000002213164166452026216 0ustar www-datawww-data# Header 1 # 123 kramdown-1.15.0/test/testcases/block/04_header/with_auto_id_stripping.html0000644000004100000410000000010613164166452026723 0ustar www-datawww-data

This is a header

kramdown-1.15.0/test/testcases/block/04_header/atx_header_no_newline_at_end.html0000644000004100000410000000002013164166452027773 0ustar www-datawww-data

header

kramdown-1.15.0/test/testcases/block/04_header/setext_header_no_newline_at_end.html0000644000004100000410000000002013164166452030513 0ustar www-datawww-data

header

kramdown-1.15.0/test/testcases/block/04_header/with_auto_ids.html0000644000004100000410000000065613164166452025021 0ustar www-datawww-data

This is a header

12. Another one-1-here

Do ^& it now

Hallo

Not now

Hallo

23232

33333

hallO

Header without ID

Transliterated: Đây-là-ví-dụ

kramdown-1.15.0/test/testcases/block/04_header/setext_header_no_newline_at_end.text0000644000004100000410000000001513164166452030537 0ustar www-datawww-dataheader ======kramdown-1.15.0/test/testcases/block/04_header/header_type_offset.html0000644000004100000410000000020313164166452026002 0ustar www-datawww-data

Lorem ipsum

Lorem ipsum

Lorem ipsum

Lorem ipsum

Lorem ipsum

Lorem ipsum

kramdown-1.15.0/test/testcases/block/04_header/with_auto_ids.text0000644000004100000410000000031013164166452025024 0ustar www-datawww-data# This is a header ## 12. Another one-1-here ### Do ^& it now Hallo ===== Not now ------- # Hallo # 23232 # 33333 ## hallO # Header without ID {: id=""} # Transliterated: Đây-là-ví-dụ kramdown-1.15.0/test/testcases/block/04_header/header_type_offset.kramdown0000644000004100000410000000015013164166452026661 0ustar www-datawww-data## Lorem ipsum ### Lorem ipsum #### Lorem ipsum ###### Lorem ipsum ## Lorem ipsum ### Lorem ipsum kramdown-1.15.0/test/testcases/block/04_header/header_type_offset.latex0000644000004100000410000000025113164166452026156 0ustar www-datawww-data\subsection*{Lorem ipsum} \subsubsection*{Lorem ipsum} \paragraph*{Lorem ipsum} \subparagraph*{Lorem ipsum} \subsection*{Lorem ipsum} \subsubsection*{Lorem ipsum} kramdown-1.15.0/test/testcases/block/04_header/with_auto_id_stripping.text0000644000004100000410000000005113164166452026742 0ustar www-datawww-data# This is a header kramdown-1.15.0/test/testcases/block/04_header/header_type_offset.text0000644000004100000410000000016513164166452026031 0ustar www-datawww-data# Lorem ipsum ## Lorem ipsum ### Lorem ipsum ###### Lorem ipsum Lorem ipsum =========== Lorem ipsum ----------- kramdown-1.15.0/test/testcases/block/04_header/setext_header.text0000644000004100000410000000043013164166452025011 0ustar www-datawww-datatest - test2 ========= test - para header = = This is a para. With two lines. And not a header. ================= > Blockquote. Not a Header - header {#id} ------------ header {#Id} ====== header {#A-Za-z0-9_:} ------ header{#noid} ----- header ------ kramdown-1.15.0/test/testcases/block/04_header/atx_header_no_newline_at_end.text0000644000004100000410000000001013164166452030012 0ustar www-datawww-data# headerkramdown-1.15.0/test/testcases/block/04_header/atx_header.text0000644000004100000410000000066713164166452024305 0ustar www-datawww-data# This is a header ## This is a header ### This is a header #### This is a header ##### This is a header ###### This is a header # Header ^ # Header ##Header ##### > blockquote ###### header paragraph > blockquote ### not a header # header \# # header # # ### Header {#id} ### Header ## {#Id} ### Header ## {#id} ### Header {#A-Za-z0-9_:t} ### Header {#9ab} ### Header{#noid} ### Header ##{#noid} ### Last kramdown-1.15.0/test/testcases/block/04_header/with_auto_id_stripping.options0000644000004100000410000000003113164166452027447 0ustar www-datawww-data:auto_id_stripping: true kramdown-1.15.0/test/testcases/block/04_header/atx_header.html0000644000004100000410000000114513164166452024255 0ustar www-datawww-data

This is a header

This is a header

This is a header

This is a header

This is a header
This is a header

Header

Header

Header

blockquote

header

paragraph

blockquote ### not a header

header #

header

#

#

Header

Header

Header

Header

Header {#9ab}

Header{#noid}

Header ##{#noid}

Last

kramdown-1.15.0/test/testcases/block/03_paragraph/0000755000004100000410000000000013164166452021776 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/03_paragraph/one_para.text0000644000004100000410000000004113164166452024463 0ustar www-datawww-dataThis is just a normal paragraph. kramdown-1.15.0/test/testcases/block/03_paragraph/no_newline_at_end.text0000644000004100000410000000010413164166452026346 0ustar www-datawww-data One paragraph over multiple lines. Second one without newline.kramdown-1.15.0/test/testcases/block/03_paragraph/indented.html0000644000004100000410000000035213164166452024456 0ustar www-datawww-data

This is a para.

This is a para.

This is a para.

This is a para.

This is a code block.

And this is another.

A para with mixed indents. and with much indent

kramdown-1.15.0/test/testcases/block/03_paragraph/no_newline_at_end.html0000644000004100000410000000012113164166452026325 0ustar www-datawww-data

One paragraph over multiple lines.

Second one without newline.

kramdown-1.15.0/test/testcases/block/03_paragraph/indented.text0000644000004100000410000000027213164166452024477 0ustar www-datawww-dataThis is a para. This is a para. This is a para. This is a para. This is a code block. And this is another. A para with mixed indents. and with much indent kramdown-1.15.0/test/testcases/block/03_paragraph/two_para.html0000644000004100000410000000014413164166452024477 0ustar www-datawww-data

This is just a normal paragraph. That goes on to the second line.

Another paragraph.

kramdown-1.15.0/test/testcases/block/03_paragraph/two_para.text0000644000004100000410000000012613164166452024517 0ustar www-datawww-dataThis is just a normal paragraph. That goes on to the second line. Another paragraph. kramdown-1.15.0/test/testcases/block/03_paragraph/one_para.html0000644000004100000410000000005013164166452024443 0ustar www-datawww-data

This is just a normal paragraph.

kramdown-1.15.0/test/testcases/block/03_paragraph/indented.html.gfm0000644000004100000410000000040213164166452025222 0ustar www-datawww-data

This is a para.

This is a para.

This is a para.

This is a para.

This is a code block.

And this is another.

A para
with
mixed
indents.
and with much indent

kramdown-1.15.0/test/testcases/block/01_blank_line/0000755000004100000410000000000013164166452022125 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/01_blank_line/spaces.text0000644000004100000410000000002013164166452024301 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/01_blank_line/tabs.text0000644000004100000410000000001613164166452023761 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/01_blank_line/tabs.html0000644000004100000410000000000113164166452023733 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/01_blank_line/spaces.html0000644000004100000410000000000113164166452024260 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/05_blockquote/0000755000004100000410000000000013164166452022203 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/05_blockquote/nested.text0000644000004100000410000000004013164166452024365 0ustar www-datawww-data> foo > > > bar >> baz > > foo kramdown-1.15.0/test/testcases/block/05_blockquote/no_newline_at_end.text0000644000004100000410000000005213164166452026555 0ustar www-datawww-data> This is a block quote > with no newline.kramdown-1.15.0/test/testcases/block/05_blockquote/nested.html0000644000004100000410000000015213164166452024351 0ustar www-datawww-data

foo

bar baz

foo

kramdown-1.15.0/test/testcases/block/05_blockquote/indented.html0000644000004100000410000000052613164166452024666 0ustar www-datawww-data

A normal blockquote.

A normal blockquote.

A normal blockquote.

A normal blockquote.

> A codeblock

Blockquote with mixed indents.

kramdown-1.15.0/test/testcases/block/05_blockquote/very_long_line.text0000644000004100000410000001576213164166452026137 0ustar www-datawww-data> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. kramdown-1.15.0/test/testcases/block/05_blockquote/with_code_blocks.text0000644000004100000410000000020613164166452026411 0ustar www-datawww-data>Example: > > sub status { > print "working"; > } > > Or: > > sub status { > return "working"; > } kramdown-1.15.0/test/testcases/block/05_blockquote/no_newline_at_end.html0000644000004100000410000000011313164166452026533 0ustar www-datawww-data

This is a block quote with no newline.

kramdown-1.15.0/test/testcases/block/05_blockquote/with_code_blocks.html0000644000004100000410000000027413164166452026376 0ustar www-datawww-data

Example:

sub status {
    print "working";
}

Or:

sub status {
    return "working";
}
kramdown-1.15.0/test/testcases/block/05_blockquote/indented.text0000644000004100000410000000024213164166452024701 0ustar www-datawww-data> A normal blockquote. > A normal blockquote. > A normal blockquote. > A normal blockquote. > A codeblock > Blockquote > with >mixed > indents. kramdown-1.15.0/test/testcases/block/05_blockquote/lazy.text0000644000004100000410000000033113164166452024065 0ustar www-datawww-data> This is a long long line. > > Nested quote inside > still inside > > This is a subquote. > > over multipline lines. > continuing here > This is a quote no code > This is a quote {: #id} > This is a quote ^ kramdown-1.15.0/test/testcases/block/05_blockquote/lazy.html0000644000004100000410000000073113164166452024051 0ustar www-datawww-data

This is a long long line.

Nested quote inside still inside

This is a subquote. over multipline lines. continuing here

This is a quote no code

This is a quote

This is a quote

kramdown-1.15.0/test/testcases/block/05_blockquote/very_long_line.html0000644000004100000410000001602413164166452026107 0ustar www-datawww-data

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

kramdown-1.15.0/test/testcases/block/10_ald/0000755000004100000410000000000013164166452020567 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/10_ald/simple.text0000644000004100000410000000025613164166452022771 0ustar www-datawww-dataSome paragraph {:id: ref1} {:id: .class1} {:id: #id} {:id: key="value"} {:id: .class2 .class3 ref2 #id-with key="value" key='value' key='dfsd\}' } {:test: k ey=value} kramdown-1.15.0/test/testcases/block/10_ald/simple.html0000644000004100000410000000002713164166452022745 0ustar www-datawww-data

Some paragraph

kramdown-1.15.0/test/testcases/block/06_codeblock/0000755000004100000410000000000013164166452021761 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/06_codeblock/with_blank_line.html0000644000004100000410000000023513164166452026000 0ustar www-datawww-data

paragraph

code block

continued here

ended

next blank line has 4 spaces

paragraph

kramdown-1.15.0/test/testcases/block/06_codeblock/with_eob_marker.text0000644000004100000410000000007013164166452026025 0ustar www-datawww-data code block continued here ^ new block here kramdown-1.15.0/test/testcases/block/06_codeblock/issue_gh45.html0000644000004100000410000000671113164166452024633 0ustar www-datawww-data

B

                       BBBBBBBB. 



           BBBB BB BBBBBBBB BBBBB. BBBBBBB BB BBBBB BB BBB BBBB BBBBB BBB BBB BBBB BBB BBBBBBB BBB BBBBBBB. B BBB'B BBBBB BBBB BBB BBBB BBBBBBB BBBB BBBB BBBB BBBBBBBB.


                BBB BBBBB BBBBB BBB BBBB BBBB BBBB, BBB BBBBB BB BBBBB BBB BB BBBBBB BBBB BBB BBBBB BBBB BB. BBBBB BBB BBBBB BBBBB BBB BBBB BB BBBB BBBB BBBBB.


                         BBBB BBBBB, BBBBB, BBBBBBBB?

                   BB BBB BB BBBB BBB BBBB BBB BBBBBB /BBB BB BBBBBBBBB BBBB BBBBBBB BBBBBB BB BBB. 


                   BBBB BBBBBBBB BBB BBBB BB BBBBB BBB BBBBBB BBBB BBBBB BBBBBB BBBBBBBBB BBBB BB BBBBB......................................................................





















              BBBBB B'B BBB BBBBB. BBBB BBBBB BBBBB. ( B BBBBB BBBBBBBBBB BBBBB BBBB'B BBBBB BBBBB. BBB BBBB BBBBB BBBB BBBB. BBBBBBB BBB BB BBBBBBB BBB BBB B BBBB BBBBBBBBBBBB. BBBBB BBBBB.)




























             BBBB'B BB

.

        B BBB BBB BBB ? B. B BBB BBBBBB BBBB BBB BBBB. BBBBBBB BB BBBBBBB B BBBB BBBB BBB BBBBBB. 













         BBBB BB 'BBBB' BBBB BBBBB.


                           BBBBBBBB B BBBB BBBBBB BB BBBBBBBB BBB BBBBBBB BBBBBBB BBBBBBB. 


     B BBBB BB BBBB. BBBBB BBBBBBBB. BBB BB BB. BB BB BBBB BB BBBBBBBBBB. BB BBBBBBBB BB BBBBBBBBB. 


                     BBBBBBBB BB BBBB. BBBBBBB BBB BBBBB BBBBB BBBBB. B'BB BBBBBBB BB BBBBB BBBBB BBBBBBB BBB BBBBB. BBBB. 

  B BBBBBB BBBB BB BBBB BBB. (BB BBB BBBBB BBBBB...............B)



           BBBB!



         BBBB BB BBB BBBBBBB BBBBBB.            B

B

     BBBBB BB/BBB BBBBB!  BBBB BBBB BBBBBBBBBBB 'BBB'B BBBBBB.' 














          BBBB BBBBBBB BBBB BB BBB BBBBBBBB BB BBBB BBBBBB BBB BBBBBBBBB BBBB. BBBBBBBB BBBBBBB BBBB BBBB BBBB BB BBBB BB BBBB BB BBBB B BBB BB BBBBB BBBBBB.  B BBBB BBBBBBB BB BBBB BBBBB B BBB BBBBBBB BB BBBBB BBBB. BBB BBBBBBB BBBB. B BBB BBBB BBBB B BBBB BBBBBB BBB B BBBBBB BBBBBB. BBB BB BBBBBB BBBBBB BBBBBBBBBB BB...BBBBB BBBB BBBB BB BBBBB. (BBBBBBB BBB BBBBBB BBB'B BBBB BBB BBBBB BBB BB BBBBB BBBBBBBBBBB  BBBBB B BBBB BBBB BBBBB. 









BBBBB BB BB BBBB B'B BBBB BBBBB BBBBB BBB BB BBBBBB/BBB (BBBBB) BBBBBB BB. 
                          BBBBBBBB. B BBB BBBB BB BB BBB/BBBBBB BBBBBB BBB BBBB BBBBBBBB BB BB B BBBBBB BBBBBB BBBBB. (BBB/B BBB BBBB BBBB...BBB BBB BBB BBBB BB BB B BBBB BB BBB BB? BBBBBBB B BBB B BBBB BBBBBBBB BBB B BBB BBB BBBBB BBBB BBB BBBB BB B BBBBBBBB BB BBBBB BB BB BBB BBBBB BBB BB BBBBB BBBBBBB B BBB BBBBBBB. BBBBBB (BBBBB) BBBB BBBBB BBBBBBB BBBBB BBBB BBBB BBB. 100 BBBBBB BB BBBBB. BBBB BBB BBB BBBBBB BBB BB. BBB BBBB BB BBB BBBBB! BBB BB BBBBBB BBBBB B BBB'B BBBBBBBBB BBBB BBB BBB. (BBBBBB BBBBBBB BB BBBB BBBBB (BBBBBB BBBBB BBBBB BBBBB.))


    BBB B BBBBBBBBBBB BBBB BBB BB BBB. BBBBB BBB BBBBB B BBBB BBBBBB BBBBB BBB. BB BBBBBB BBB BBBB B BBB BB BBBBBBBB BBBBBB BBBB BBB B BBBBBB BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBBBBBB.











           BBBBB!!!!!!!


         B BBB BBBB BBBBBB BBBB BBBB BBBB B BBB BBBBB BBB BBBBB B BBBB BBBBBBB BB BB BBBB BBBBBBBBB. B BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBB.

                                               BB BB, BB BBBBBB BBBB, (BBBBBB BB BBB BBBB . BBBBB BB BBBB BBBB BB BB BBBB BBBB B BBBB BB BB (BB BBBB BB BBB BBBBBBB BB BBBBBBB. )) BB'BB BBB BBB'B BB BB BBBB BB B BBBB B BBBBB (BB BBBBBB BB BBB B'BB BBBBBBBB BB BBBB BBBB.)


  B BBBBB B'BB BBB BB BBBB BBB BBB.
kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.text0000644000004100000410000000010513164166452031647 0ustar www-datawww-data~~~ asn.1 text ~~~ ~~~ asn#w1 text ~~~ ~~~ русский text ~~~ kramdown-1.15.0/test/testcases/block/06_codeblock/disable-highlighting.options0000644000004100000410000000002713164166452027443 0ustar www-datawww-data:enable_coderay: false kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-minted-with-opts.text0000644000004100000410000000027313164166452030550 0ustar www-datawww-data x = Class.new {: .language-ruby} this is a reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, long link {: .language-html} kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/0000755000004100000410000000000013164166452023102 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/06_codeblock/rouge/disabled.text0000644000004100000410000000002213164166452025551 0ustar www-datawww-data x = Class.new kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/disabled.html0000644000004100000410000000004713164166452025540 0ustar www-datawww-data
x = Class.new
kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/simple.text0000644000004100000410000000014413164166452025300 0ustar www-datawww-data x = Class.new ^ href {: .language-html} ~~~ php?start_inline=1 $foo = new Bar; ~~~ kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/simple.html0000644000004100000410000000130413164166452025257 0ustar www-datawww-data
x = Class.new
<a>href</a>
$foo = new Bar;
kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/simple.options0000644000004100000410000000011213164166452026002 0ustar www-datawww-data:syntax_highlighter: rouge :syntax_highlighter_opts: default_lang: ruby kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/multiple.html0000644000004100000410000000132413164166452025623 0ustar www-datawww-data
puts "Hello"
puts "World"
$foo = new Bar;
kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/multiple.options0000644000004100000410000000017113164166452026351 0ustar www-datawww-data:syntax_highlighter: rouge :syntax_highlighter_opts: default_lang: ruby formatter: !ruby/class 'RougeHTMLFormatters' kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/multiple.text0000644000004100000410000000014013164166452025636 0ustar www-datawww-data~~~ ruby puts "Hello" ~~~ ~~~ ruby puts "World" ~~~ ~~~ php?start_inline=1 $foo = new Bar; ~~~kramdown-1.15.0/test/testcases/block/06_codeblock/rouge/disabled.options0000644000004100000410000000012013164166452026257 0ustar www-datawww-data:syntax_highlighter: rouge :syntax_highlighter_opts: block: disable: true kramdown-1.15.0/test/testcases/block/06_codeblock/with_eob_marker.html0000644000004100000410000000013413164166452026006 0ustar www-datawww-data
code block

continued here
new block here
kramdown-1.15.0/test/testcases/block/06_codeblock/normal.html0000644000004100000410000000025013164166452024134 0ustar www-datawww-data
starting code

paragraph

other code  
with samples 

paragraph

  ending code
kramdown-1.15.0/test/testcases/block/06_codeblock/no_newline_at_end_1.text0000644000004100000410000000002013164166452026546 0ustar www-datawww-data test test kramdown-1.15.0/test/testcases/block/06_codeblock/no_newline_at_end.text0000644000004100000410000000001213164166452026327 0ustar www-datawww-data test kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting.options0000644000004100000410000000013613164166452026043 0ustar www-datawww-data:coderay_default_lang: ruby :coderay_wrap: span :coderay_line_numbers: ~ :coderay_css: class kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting.html0000644000004100000410000000043613164166452025317 0ustar www-datawww-data
x = Class.new
<a>href</a>
kramdown-1.15.0/test/testcases/block/06_codeblock/disable-highlighting.text0000644000004100000410000000006413164166452026735 0ustar www-datawww-data x = Class.new ^ href {: lang="html"} kramdown-1.15.0/test/testcases/block/06_codeblock/error.html0000644000004100000410000000005613164166452024001 0ustar www-datawww-data

Some para

~~~~~~ not codeblock

kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-opts.text0000644000004100000410000000006713164166452026322 0ustar www-datawww-data x = Class.new ^ href {: .language-html} kramdown-1.15.0/test/testcases/block/06_codeblock/with_ial.text0000644000004100000410000000007613164166452024472 0ustar www-datawww-data code block continued here {:.cls} new block here kramdown-1.15.0/test/testcases/block/06_codeblock/no_newline_at_end_1.html0000644000004100000410000000004513164166452026535 0ustar www-datawww-data
test   test
kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.html0000644000004100000410000000013713164166452033022 0ustar www-datawww-data
s1'dim'a'500'm'500'q'500''
index'j'j+1'j-1''
kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-minted.options0000644000004100000410000000011313164166452027314 0ustar www-datawww-data:syntax_highlighter: minted :syntax_highlighter_opts: default_lang: ruby kramdown-1.15.0/test/testcases/block/06_codeblock/no_newline_at_end.html0000644000004100000410000000004013164166452026310 0ustar www-datawww-data
test  
kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-minted.latex0000644000004100000410000000014413164166452026742 0ustar www-datawww-data\begin{minted}[]{ruby} x = Class.new \end{minted} \begin{minted}[]{html} href \end{minted} kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.options0000644000004100000410000000003013164166452033541 0ustar www-datawww-data:enable_coderay: false kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-opts.options0000644000004100000410000000015213164166452027024 0ustar www-datawww-data:syntax_highlighter_opts: block: css: class default_lang: ruby wrap: span line_numbers: null kramdown-1.15.0/test/testcases/block/06_codeblock/disable-highlighting.html0000644000004100000410000000014413164166452026714 0ustar www-datawww-data
x = Class.new
<a>href</a>
kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-minted-with-opts.latex0000644000004100000410000000037313164166452030702 0ustar www-datawww-data\begin{minted}[breaklines,linenos]{ruby} x = Class.new \end{minted} \begin{minted}[breaklines,linenos]{html} this is a reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, long link \end{minted} kramdown-1.15.0/test/testcases/block/06_codeblock/with_ial.html0000644000004100000410000000015013164166452024443 0ustar www-datawww-data
code block

continued here
new block here
kramdown-1.15.0/test/testcases/block/06_codeblock/error.text0000644000004100000410000000004013164166452024012 0ustar www-datawww-dataSome para ~~~~~~ not codeblock kramdown-1.15.0/test/testcases/block/06_codeblock/tilde_syntax.html0000644000004100000410000000015313164166452025355 0ustar www-datawww-data
Here comes some code.
~~~~~~~
code with tildes
~~~~~~~~
kramdown-1.15.0/test/testcases/block/06_codeblock/whitespace.html0000644000004100000410000000070213164166452025002 0ustar www-datawww-data
This	issome
whitespace
kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block.options0000644000004100000410000000003013164166452030507 0ustar www-datawww-data:enable_coderay: false kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting.text0000644000004100000410000000006713164166452025337 0ustar www-datawww-data x = Class.new ^ href {: .language-html} kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-minted-with-opts.options0000644000004100000410000000013013164166452031247 0ustar www-datawww-data:syntax_highlighter: minted :syntax_highlighter_opts: wrap: true line_numbers: true kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-minted.text0000644000004100000410000000006713164166452026615 0ustar www-datawww-data x = Class.new ^ href {: .language-html} kramdown-1.15.0/test/testcases/block/06_codeblock/highlighting-opts.html0000644000004100000410000000043613164166452026302 0ustar www-datawww-data
x = Class.new
<a>href</a>
kramdown-1.15.0/test/testcases/block/06_codeblock/issue_gh45.test0000644000004100000410000000726313164166452024651 0ustar www-datawww-data B BBBBBBBB. BBBB BB BBBBBBBB BBBBB. BBBBBBB BB BBBBB BB BBB BBBB BBBBB BBB BBB BBBB BBB BBBBBBB BBB BBBBBBB. B BBB'B BBBBB BBBB BBB BBBB BBBBBBB BBBB BBBB BBBB BBBBBBBB. BBB BBBBB BBBBB BBB BBBB BBBB BBBB, BBB BBBBB BB BBBBB BBB BB BBBBBB BBBB BBB BBBBB BBBB BB. BBBBB BBB BBBBB BBBBB BBB BBBB BB BBBB BBBB BBBBB. BBBB BBBBB, BBBBB, BBBBBBBB? BB BBB BB BBBB BBB BBBB BBB BBBBBB /BBB BB BBBBBBBBB BBBB BBBBBBB BBBBBB BB BBB. BBBB BBBBBBBB BBB BBBB BB BBBBB BBB BBBBBB BBBB BBBBB BBBBBB BBBBBBBBB BBBB BB BBBBB...................................................................... BBBBB B'B BBB BBBBB. BBBB BBBBB BBBBB. ( B BBBBB BBBBBBBBBB BBBBB BBBB'B BBBBB BBBBB. BBB BBBB BBBBB BBBB BBBB. BBBBBBB BBB BB BBBBBBB BBB BBB B BBBB BBBBBBBBBBBB. BBBBB BBBBB.) BBBB'B BB . B BBB BBB BBB ? B. B BBB BBBBBB BBBB BBB BBBB. BBBBBBB BB BBBBBBB B BBBB BBBB BBB BBBBBB. BBBB BB 'BBBB' BBBB BBBBB. BBBBBBBB B BBBB BBBBBB BB BBBBBBBB BBB BBBBBBB BBBBBBB BBBBBBB. B BBBB BB BBBB. BBBBB BBBBBBBB. BBB BB BB. BB BB BBBB BB BBBBBBBBBB. BB BBBBBBBB BB BBBBBBBBB. BBBBBBBB BB BBBB. BBBBBBB BBB BBBBB BBBBB BBBBB. B'BB BBBBBBB BB BBBBB BBBBB BBBBBBB BBB BBBBB. BBBB. B BBBBBB BBBB BB BBBB BBB. (BB BBB BBBBB BBBBB...............B) BBBB! BBBB BB BBB BBBBBBB BBBBBB. B B BBBBB BB/BBB BBBBB! BBBB BBBB BBBBBBBBBBB 'BBB'B BBBBBB.' BBBB BBBBBBB BBBB BB BBB BBBBBBBB BB BBBB BBBBBB BBB BBBBBBBBB BBBB. BBBBBBBB BBBBBBB BBBB BBBB BBBB BB BBBB BB BBBB BB BBBB B BBB BB BBBBB BBBBBB. B BBBB BBBBBBB BB BBBB BBBBB B BBB BBBBBBB BB BBBBB BBBB. BBB BBBBBBB BBBB. B BBB BBBB BBBB B BBBB BBBBBB BBB B BBBBBB BBBBBB. BBB BB BBBBBB BBBBBB BBBBBBBBBB BB...BBBBB BBBB BBBB BB BBBBB. (BBBBBBB BBB BBBBBB BBB'B BBBB BBB BBBBB BBB BB BBBBB BBBBBBBBBBB BBBBB B BBBB BBBB BBBBB. BBBBB BB BB BBBB B'B BBBB BBBBB BBBBB BBB BB BBBBBB/BBB (BBBBB) BBBBBB BB. BBBBBBBB. B BBB BBBB BB BB BBB/BBBBBB BBBBBB BBB BBBB BBBBBBBB BB BB B BBBBBB BBBBBB BBBBB. (BBB/B BBB BBBB BBBB...BBB BBB BBB BBBB BB BB B BBBB BB BBB BB? BBBBBBB B BBB B BBBB BBBBBBBB BBB B BBB BBB BBBBB BBBB BBB BBBB BB B BBBBBBBB BB BBBBB BB BB BBB BBBBB BBB BB BBBBB BBBBBBB B BBB BBBBBBB. BBBBBB (BBBBB) BBBB BBBBB BBBBBBB BBBBB BBBB BBBB BBB. 100 BBBBBB BB BBBBB. BBBB BBB BBB BBBBBB BBB BB. BBB BBBB BB BBB BBBBB! BBB BB BBBBBB BBBBB B BBB'B BBBBBBBBB BBBB BBB BBB. (BBBBBB BBBBBBB BB BBBB BBBBB (BBBBBB BBBBB BBBBB BBBBB.)) BBB B BBBBBBBBBBB BBBB BBB BB BBB. BBBBB BBB BBBBB B BBBB BBBBBB BBBBB BBB. BB BBBBBB BBB BBBB B BBB BB BBBBBBBB BBBBBB BBBB BBB B BBBBBB BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBBBBBB. BBBBB!!!!!!! B BBB BBBB BBBBBB BBBB BBBB BBBB B BBB BBBBB BBB BBBBB B BBBB BBBBBBB BB BB BBBB BBBBBBBBB. B BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBB. BB BB, BB BBBBBB BBBB, (BBBBBB BB BBB BBBB . BBBBB BB BBBB BBBB BB BB BBBB BBBB B BBBB BB BB (BB BBBB BB BBB BBBBBBB BB BBBBBBB. )) BB'BB BBB BBB'B BB BB BBBB BB B BBBB B BBBBB (BB BBBBBB BB BBB B'BB BBBBBBBB BB BBBB BBBB.) B BBBBB B'BB BBB BB BBBB BBB BBB. kramdown-1.15.0/test/testcases/block/06_codeblock/whitespace.text0000644000004100000410000000007513164166452025025 0ustar www-datawww-data This is some whitespace {:.show-whitespaces} kramdown-1.15.0/test/testcases/block/06_codeblock/normal.text0000644000004100000410000000013713164166452024160 0ustar www-datawww-data starting code paragraph other code with samples paragraph ending code kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.options0000644000004100000410000000003013164166452032353 0ustar www-datawww-data:enable_coderay: false kramdown-1.15.0/test/testcases/block/06_codeblock/lazy.text0000644000004100000410000000006413164166452023646 0ustar www-datawww-data This is some code This is some other code kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block.html0000644000004100000410000000061513164166452027771 0ustar www-datawww-data
def what?
  42
end
def what?
  42
end
def what?
  42
end
def what?
  42
end
def what?
  42
end
kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.text0000644000004100000410000000007513164166452033043 0ustar www-datawww-data~~~ act-iii s1'dim'a'500'm'500'q'500'' index'j'j+1'j-1'' ~~~ kramdown-1.15.0/test/testcases/block/06_codeblock/lazy.html0000644000004100000410000000010513164166452023622 0ustar www-datawww-data
This is some code

This is some  other code
kramdown-1.15.0/test/testcases/block/06_codeblock/tilde_syntax.text0000644000004100000410000000015313164166452025375 0ustar www-datawww-data~~~~~~~~ Here comes some code. ~~~~~~~~ ~~~~~~~~~~~~ ~~~~~~~ code with tildes ~~~~~~~~ ~~~~~~~~~~~~~~~~~~ kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.html0000644000004100000410000000025313164166452031633 0ustar www-datawww-data
text
text
text
kramdown-1.15.0/test/testcases/block/06_codeblock/with_lang_in_fenced_block.text0000644000004100000410000000035613164166452030013 0ustar www-datawww-data~~~ ruby def what? 42 end ~~~ ~~~ ruby def what? 42 end ~~~ {:.class1} ~~~ def what? 42 end ~~~ {: .language-ruby} ~~~ ruby def what? 42 end ~~~ {: .language-python} ~~~ ruby def what? 42 end ~~~ {: class="language-python"} kramdown-1.15.0/test/testcases/block/06_codeblock/with_blank_line.text0000644000004100000410000000015313164166452026017 0ustar www-datawww-dataparagraph code block continued here ended next blank line has 4 spaces paragraph kramdown-1.15.0/test/testcases/block/02_eob/0000755000004100000410000000000013164166452020575 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/02_eob/end.text0000644000004100000410000000000413164166452022243 0ustar www-datawww-data ^ kramdown-1.15.0/test/testcases/block/02_eob/middle.text0000644000004100000410000000000613164166452022735 0ustar www-datawww-data ^ kramdown-1.15.0/test/testcases/block/02_eob/beginning.html0000644000004100000410000000000113164166452023412 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/02_eob/middle.html0000644000004100000410000000000113164166452022710 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/02_eob/end.html0000644000004100000410000000000113164166452022220 0ustar www-datawww-data kramdown-1.15.0/test/testcases/block/02_eob/beginning.text0000644000004100000410000000000413164166452023435 0ustar www-datawww-data^ kramdown-1.15.0/test/testcases/block/12_extension/0000755000004100000410000000000013164166452022045 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/12_extension/options3.text0000644000004100000410000000026013164166452024527 0ustar www-datawww-data x = Class.new {: .language-ruby} {::options coderay_wrap="span" coderay_line_numbers="" coderay_css="class" coderay_tab_width="4" /} x = Class.new {: .language-ruby} kramdown-1.15.0/test/testcases/block/12_extension/options.text0000644000004100000410000000042313164166452024445 0ustar www-datawww-data# No header id {::options unusedvar="val" /} # without header id
some *para*
{::options parse_block_html="true" parse_span_html="true" /}
some *para*
{::options footnote_nr="10" /} Some text[^ab]. [^ab]: Some text. kramdown-1.15.0/test/testcases/block/12_extension/nomarkdown.text0000644000004100000410000000046613164166452025140 0ustar www-datawww-dataThis is a simple paragraph. {::nomarkdown} This *is* not processed {:/nomarkdown} And another paragraph {::nomarkdown this='is' .ignore /} {::nomarkdown type='html'} bold {:/} {::nomarkdown type="latex"} \begin{itemize} \item[Yes] YESSSS! \end{itemize} {:/} {::nomarkdown} Another paragraph kramdown-1.15.0/test/testcases/block/12_extension/ignored.text0000644000004100000410000000011613164166452024400 0ustar www-datawww-dataparagraph {::something} anotherthing {:/something} {::something/} paragraph kramdown-1.15.0/test/testcases/block/12_extension/options2.html0000644000004100000410000000036113164166452024510 0ustar www-datawww-data

Some text1.

  1. Some text. 

kramdown-1.15.0/test/testcases/block/12_extension/nomarkdown.html0000644000004100000410000000022313164166452025107 0ustar www-datawww-data

This is a simple paragraph.

This *is* not processed

And another paragraph

bold

{::nomarkdown} Another paragraph

kramdown-1.15.0/test/testcases/block/12_extension/options3.html0000644000004100000410000000040113164166452024504 0ustar www-datawww-data
x = Class.new
x = Class.new
kramdown-1.15.0/test/testcases/block/12_extension/comment.text0000644000004100000410000000030013164166452024406 0ustar www-datawww-dataThis is a simple paragraph. {::comment} This is a comment {:/}which is {:/comment} ignored. {:/comment} And another paragraph {::comment this='is' .ignore /} {::comment} Another paragraph kramdown-1.15.0/test/testcases/block/12_extension/comment.html0000644000004100000410000000024513164166452024376 0ustar www-datawww-data

This is a simple paragraph.

And another paragraph

{::comment} Another paragraph

kramdown-1.15.0/test/testcases/block/12_extension/options.html0000644000004100000410000000061513164166452024430 0ustar www-datawww-data

No header id

without header id

some *para*

some para

Some text10.

  1. Some text. 

kramdown-1.15.0/test/testcases/block/12_extension/nomarkdown.latex0000644000004100000410000000024413164166452025263 0ustar www-datawww-dataThis is a simple paragraph. This *is* not processed And another paragraph \begin{itemize} \item[Yes] YESSSS! \end{itemize} \{::nomarkdown\} Another paragraph kramdown-1.15.0/test/testcases/block/12_extension/nomarkdown.kramdown0000644000004100000410000000040713164166452025771 0ustar www-datawww-dataThis is a simple paragraph. {::nomarkdown} This *is* not processed {:/} And another paragraph {::nomarkdown type="html"} bold {:/} {::nomarkdown type="latex"} \begin{itemize} \item[Yes] YESSSS! \end{itemize} {:/} \{::nomarkdown} Another paragraph kramdown-1.15.0/test/testcases/block/12_extension/options2.text0000644000004100000410000000010513164166452024524 0ustar www-datawww-data{::options footnote_nr="da10" /} Some text[^ab]. [^ab]: Some text. kramdown-1.15.0/test/testcases/block/12_extension/ignored.html0000644000004100000410000000014313164166452024360 0ustar www-datawww-data

paragraph

{::something} anotherthing {:/something}

{::something/} paragraph

kramdown-1.15.0/test/testcases/block/14_table/0000755000004100000410000000000013164166452021122 5ustar www-datawww-datakramdown-1.15.0/test/testcases/block/14_table/escaping.html0000644000004100000410000000140513164166452023601 0ustar www-datawww-data

cell 1 | cell 2

cell 1 | cell 2

cell 1 cell 2 | continued
cell 1 cell 2
cell 1 code | span

cell 1 code | span

cell 1 | code | span

cell 1 cell `2 cell 3
cell 1` cell 2 cell 3

cell 1 | cell 2 | cell 3 cell 1 | cell 2 | cell 3

kramdown-1.15.0/test/testcases/block/14_table/errors.html0000644000004100000410000000016313164166452023324 0ustar www-datawww-data

No table body

|-|-|-

|no|table|here|

|no|table|here| paragraph

|-|-| |-|-|

kramdown-1.15.0/test/testcases/block/14_table/simple.html.190000644000004100000410000000456213164166452023540 0ustar www-datawww-data
cell1 cell2
cell3 cell4
cell5 cell6 |
cell7 cell8

Missing cells at end

cell1 cell2 cell3
cell1    
  cell2 cell3

Escaped pipe characters

cell1 | cell1 cell2
cell1 cell2 |
cell1 | con cell2

Table with code elements

This is a span | with a pipe.      
Some span </em> here a span | with a pipe.

Special cases regarding codespan syntax

a b
a
table with ial
table with ial

not starting with a bar

simple table
head1 head2
cell1 cell2
head1 head2
  cell2
a b
c d
e f
kramdown-1.15.0/test/testcases/block/14_table/escaping.text0000644000004100000410000000040713164166452023622 0ustar www-datawww-data`cell 1 | cell 2` cell 1 \| cell 2 cell 1 | cell 2 \| continued cell 1 | cell `2` cell 1 | `code | span` cell 1 `code | span` cell 1 \| `code | span` cell 1 | cell `2 | cell 3 cell 1` | cell 2 | cell 3 cell 1 \| cell `2 | cell 3 cell 1` | cell 2 | cell 3 kramdown-1.15.0/test/testcases/block/14_table/no_table.html0000644000004100000410000000005613164166452023574 0ustar www-datawww-data

No table

| Some | thing | here

kramdown-1.15.0/test/testcases/block/14_table/simple.text0000644000004100000410000000123013164166452023315 0ustar www-datawww-data| cell1 | cell2 | |cell3 | cell4| |cell5|cell6 \| | cell7|cell8 Missing cells at end | cell1 | cell2 | cell3 | | cell1 || || cell2 | cell3 Escaped pipe characters | cell1 \| cell1 | cell2 | | cell1 | cell2 \| | cell1 `|` con | cell2 Table with code elements | This is a span | with a pipe. | Some span | here | a span | with a | pipe. Special cases regarding codespan syntax |a|`b` |`a` {:.cls} | table | with | ial | table | with | ial {:.cls} not starting with a bar simple | table head1 | head2 ------|------ cell1 | cell2 head1 | head2 -------|------ | cell2 | a | b | c | d | e | f | kramdown-1.15.0/test/testcases/block/14_table/errors.text0000644000004100000410000000013213164166452023340 0ustar www-datawww-dataNo table body |-|-|- [5]: test |no|table|here| |no|table|here| paragraph |-|-| |-|-| kramdown-1.15.0/test/testcases/block/14_table/simple.html0000644000004100000410000000461613164166452023310 0ustar www-datawww-data
cell1 cell2
cell3 cell4
cell5 cell6 |
cell7 cell8

Missing cells at end

cell1 cell2 cell3
cell1    
  cell2 cell3

Escaped pipe characters

cell1 | cell1 cell2
cell1 cell2 |
cell1 | con cell2

Table with code elements

This is a span | with a pipe.      
Some span </em> here a span | with a pipe.

Special cases regarding codespan syntax

a b
a
table with ial
table with ial

not starting with a bar

simple table
head1 head2
cell1 cell2
head1 head2
  cell2
a b
c d
e f
kramdown-1.15.0/test/testcases/block/14_table/table_with_footnote.html0000644000004100000410000000072213164166452026050 0ustar www-datawww-data
this is 1 a table
with a footnote
  1. Something

    special here

kramdown-1.15.0/test/testcases/block/14_table/header.html0000644000004100000410000000362113164166452023242 0ustar www-datawww-data

Simple header

cell1 cell2
cell3 cell4

Full header

cell1 cell2
cell3 cell4

With alignment and superfluous alignment defs

default left center right default
cell1 cell2 cell3 cell4 cell5

With leading sep line

cell1 cell2
cell3 cell4

Multiple bodies

cell1 cell2
cell3 cell4
cell5 cell6

Sep line with tab

right center
cell1 cell2
cell3 cell4
kramdown-1.15.0/test/testcases/block/14_table/header.text0000644000004100000410000000101613164166452023256 0ustar www-datawww-dataSimple header | cell1 | cell2 |----- | cell3 | cell4 Full header | cell1 | cell2 |-------|-------| | cell3 | cell4 With alignment and superfluous alignment defs | default | left | center | right | default |-| :- |:-: | -: | - | :-: | :- | cell1 | cell2 | cell3 | cell4 | cell5 With leading sep line |:-:|-:| | cell1 | cell2 |-------|-------| | cell3 | cell4 Multiple bodies | cell1 | cell2 + :-: | | cell3 | cell4 |----||| | cell5 | cell6 Sep line with tab right | center ---: | :---: cell1 | cell2 cell3 | cell4 kramdown-1.15.0/test/testcases/block/14_table/footer.text0000644000004100000410000000037613164166452023334 0ustar www-datawww-dataSimple footer | cell1 | cell2 |= | cell3 | cell4 Full footer | cell1 | cell2 |=======|=======| | cell3 | cell4 Footer with separator lines | cell1 | cell2 |=======|=======| | cell3 | cell4 |--- | cell5 | cell6 |--- Empty footer | cell1 | cell2 |= kramdown-1.15.0/test/testcases/block/14_table/table_with_footnote.text0000644000004100000410000000012213164166452026062 0ustar www-datawww-data| this is [^1] | a table | with a | footnote [^1]: Something > special here kramdown-1.15.0/test/testcases/block/14_table/no_table.text0000644000004100000410000000004313164166452023610 0ustar www-datawww-dataNo table \| Some \| thing \| here kramdown-1.15.0/test/testcases/block/14_table/footer.html0000644000004100000410000000144513164166452023312 0ustar www-datawww-data

Simple footer

cell1 cell2
cell3 cell4

Full footer

cell1 cell2
cell3 cell4

Footer with separator lines

cell1 cell2
cell3 cell4
cell5 cell6

Empty footer

cell1 cell2
kramdown-1.15.0/test/testcases/block/14_table/table_with_footnote.latex0000644000004100000410000000023513164166452026220 0ustar www-datawww-data\begin{longtable}{|l|l|} \hline this is \footnote{Something \begin{quote} special here \end{quote}} & a table\\ with a & footnote\\ \hline \end{longtable} kramdown-1.15.0/test/testcases/encoding.html0000644000004100000410000000174513164166452021120 0ustar www-datawww-data

Das ist gewöhnlich ein Über-Problem mit manchen
Sälen http://example.org und anderen Dinge. Siehe Über mich!

Vielleicht höre ich nicht richtig?

  • Sollten wir uns das überlegen? Verhöhne mich nicht!
  • Ho ho höher! Sind *wir* da?

Titel sind urschön

Manche mögens ärmer

öha
was nun?
Töne
Laute Geräusche
vielleicht noch was ähnliches
hoch höher am höchsten
über drüber müde

Das ist schön gemacht

kramdown-1.15.0/man/0000755000004100000410000000000013164166452014233 5ustar www-datawww-datakramdown-1.15.0/man/man1/0000755000004100000410000000000013164166452015067 5ustar www-datawww-datakramdown-1.15.0/man/man1/kramdown.10000644000004100000410000003234213164166452016777 0ustar www-datawww-data.\" generated by kramdown .TH "KRAMDOWN" "1" "November 2016" .SH NAME kramdown \- a fast, pure\-Ruby Markdown\-superset converter .SH "SYNOPSIS" \fBkramdown\fP [\fIoptions\fP] [\fIFILE\fP\.\.\.] .SH "DESCRIPTION" kramdown is primarily used for parsing a superset of Markdown and converting it to different output formats\. It supports standard Markdown (with some minor modifications) and various extensions like tables and definition lists\. Due to its modular architecture it also allows other input formats than Markdown, for example, HTML or Github Flavored Markdown\. .P If \fIFILE\fP is not specified, kramdown reads from the standard input\. The result is written to the standard output\. .P There are two sets of options that kramdown accepts: The first one includes the options that are used directly by the kramdown binary\. The second set of options controls how kramdown parses and converts its input\. .SH "CLI\-ONLY OPTIONS" .TP \fB\-i\fP \fIFORMAT\fP, \fB\-\-input\fP \fIFORMAT\fP Specify the input format\. Available input formats: \fIkramdown\fP (this is the default), \fImarkdown\fP, \fIGFM\fP or \fIhtml\fP\&\. .TP \fB\-o\fP \fIFORMAT\fP, \fB\-\-output\fP \fIFORMAT\fP Specify one or more output formats separated by commas: \fIhtml\fP (default), \fIkramdown\fP, \fIlatex\fP, \fIpdf\fP, \fIman\fP or \fIremove_html_tags\fP\&\. .TP \fB\-v\fP, \fB\-\-version\fP Show the version of kramdown\. .TP \fB\-h\fP, \fB\-\-help\fP Show the help\. .SH "KRAMDOWN OPTIONS" .TP \fB\-\-auto\-id\-prefix\fP \fIARG\fP Prefix used for automatically generated header IDs .RS .P This option can be used to set a prefix for the automatically generated header IDs so that there is no conflict when rendering multiple kramdown documents into one output file separately\. The prefix should only contain characters that are valid in an ID! .P Default: \[u2018]\[u2019] Used by: HTML/Latex converter .RE .TP \fB\-\-[no\-]auto\-id\-stripping\fP Strip all formatting from header text for automatic ID generation .RS .P If this option is \fBtrue\fP, only the text elements of a header are used for generating the ID later (in contrast to just using the raw header text line)\. .P This option will be removed in version 2\.0 because this will be the default then\. .P Default: false Used by: kramdown parser .RE .TP \fB\-\-[no\-]auto\-ids\fP Use automatic header ID generation .RS .P If this option is \fBtrue\fP, ID values for all headers are automatically generated if no ID is explicitly specified\. .P Default: true Used by: HTML/Latex converter .RE .TP \fB\-\-coderay\-bold\-every\fP \fIARG\fP Defines how often a line number should be made bold .RS .P Can either be an integer or false (to turn off bold line numbers completely)\. .P Default: 10 Used by: HTML converter .RE .TP \fB\-\-coderay\-css\fP \fIARG\fP Defines how the highlighted code gets styled .RS .P Possible values are :class (CSS classes are applied to the code elements, one must supply the needed CSS file) or :style (default CSS styles are directly applied to the code elements)\. .P Default: style Used by: HTML converter .RE .TP \fB\-\-coderay\-default\-lang\fP \fIARG\fP Sets the default language for highlighting code blocks .RS .P If no language is set for a code block, the default language is used instead\. The value has to be one of the languages supported by coderay or nil if no default language should be used\. .P Default: nil Used by: HTML converter .RE .TP \fB\-\-coderay\-line\-number\-start\fP \fIARG\fP The start value for the line numbers .RS .P Default: 1 Used by: HTML converter .RE .TP \fB\-\-coderay\-line\-numbers\fP \fIARG\fP Defines how and if line numbers should be shown .RS .P The possible values are :table, :inline or nil\. If this option is nil, no line numbers are shown\. .P Default: :inline Used by: HTML converter .RE .TP \fB\-\-coderay\-tab\-width\fP \fIARG\fP The tab width used in highlighted code .RS .P Used by: HTML converter .RE .TP \fB\-\-coderay\-wrap\fP \fIARG\fP Defines how the highlighted code should be wrapped .RS .P The possible values are :span, :div or nil\. .P Default: :div Used by: HTML converter .RE .TP \fB\-\-[no\-]enable\-coderay\fP Use coderay for syntax highlighting .RS .P If this option is \fBtrue\fP, coderay is used by the HTML converter for syntax highlighting the content of code spans and code blocks\. .P Default: true Used by: HTML converter .RE .TP \fB\-\-entity\-output\fP \fIARG\fP Defines how entities are output .RS .P The possible values are :as_input (entities are output in the same form as found in the input), :numeric (entities are output in numeric form), :symbolic (entities are output in symbolic form if possible) or :as_char (entities are output as characters if possible, only available on Ruby 1\.9)\. .P Default: :as_char Used by: HTML converter, kramdown converter .RE .TP \fB\-\-footnote\-backlink\fP \fIARG\fP Defines the text that should be used for the footnote backlinks .RS .P The footnote backlink is just text, so any special HTML characters will be escaped\. .P If the footnote backlint text is an empty string, no footnote backlinks will be generated\. .P Default: \[u2018]\[u0026]8617;\[u2019] Used by: HTML converter .RE .TP \fB\-\-footnote\-nr\fP \fIARG\fP The number of the first footnote .RS .P This option can be used to specify the number that is used for the first footnote\. .P Default: 1 Used by: HTML converter .RE .TP \fB\-\-gfm\-quirks\fP \fIARG\fP Enables a set of GFM specific quirks .RS .P The way how GFM is transformed on Github often differs from the way kramdown does things\. Many of these differences are negligible but others are not\. .P This option allows one to enable/disable certain GFM quirks, i\.e\. ways in which GFM parsing differs from kramdown parsing\. .P The value has to be a list of quirk names that should be enabled, separated by commas\. Possible names are: .IP \(bu 4 paragraph_end .RS .P Disables the kramdown restriction that at least one blank line has to be used after a paragraph before a new block element can be started\. .P Note that if this quirk is used, lazy line wrapping does not fully work anymore! .RE .P Default: paragraph_end Used by: GFM parser .RE .TP \fB\-\-[no\-]hard\-wrap\fP Interprets line breaks literally .RS .P Insert HTML \fB
\fP tags inside paragraphs where the original Markdown document had newlines (by default, Markdown ignores these newlines)\. .P Default: true Used by: GFM parser .RE .TP \fB\-\-header\-offset\fP \fIARG\fP Sets the output offset for headers .RS .P If this option is c (may also be negative) then a header with level n will be output as a header with level c+n\. If c+n is lower than 1, level 1 will be used\. If c+n is greater than 6, level 6 will be used\. .P Default: 0 Used by: HTML converter, Kramdown converter, Latex converter .RE .TP \fB\-\-[no\-]html\-to\-native\fP Convert HTML elements to native elements .RS .P If this option is \fBtrue\fP, the parser converts HTML elements to native elements\. For example, when parsing \fBhallo\fP the emphasis tag would normally be converted to an \fB:html\fP element with tag type \fB:em\fP\&\. If \fBhtml_to_native\fP is \fBtrue\fP, then the emphasis would be converted to a native \fB:em\fP element\. .P This is useful for converters that cannot deal with HTML elements\. .P Default: false Used by: kramdown parser .RE .TP \fB\-\-latex\-headers\fP \fIARG\fP Defines the LaTeX commands for different header levels .RS .P The commands for the header levels one to six can be specified by separating them with commas\. .P Default: section,subsection,subsubsection,paragraph,subparagraph,subparagraph Used by: Latex converter .RE .TP \fB\-\-line\-width\fP \fIARG\fP Defines the line width to be used when outputting a document .RS .P Default: 72 Used by: kramdown converter .RE .TP \fB\-\-link\-defs\fP \fIARG\fP Pre\-defines link definitions .RS .P This option can be used to pre\-define link definitions\. The value needs to be a Hash where the keys are the link identifiers and the values are two element Arrays with the link URL and the link title\. .P If the value is a String, it has to contain a valid YAML hash and the hash has to follow the above guidelines\. .P Default: {} Used by: kramdown parser .RE .TP \fB\-\-math\-engine\fP \fIARG\fP Set the math engine .RS .P Specifies the math engine that should be used for converting math blocks/spans\. If this option is set to +nil+, no math engine is used and the math blocks/spans are output as is\. .P Options for the selected math engine can be set with the math_engine_opts configuration option\. .P Default: mathjax Used by: HTML converter .RE .TP \fB\-\-math\-engine\-opts\fP \fIARG\fP Set the math engine options .RS .P Specifies options for the math engine set via the math_engine configuration option\. .P The value needs to be a hash with key\-value pairs that are understood by the used math engine\. .P Default: {} Used by: HTML converter .RE .TP \fB\-\-[no\-]parse\-block\-html\fP Process kramdown syntax in block HTML tags .RS .P If this option is \fBtrue\fP, the kramdown parser processes the content of block HTML tags as text containing block\-level elements\. Since this is not wanted normally, the default is \fBfalse\fP\&\. It is normally better to selectively enable kramdown processing via the markdown attribute\. .P Default: false Used by: kramdown parser .RE .TP \fB\-\-[no\-]parse\-span\-html\fP Process kramdown syntax in span HTML tags .RS .P If this option is \fBtrue\fP, the kramdown parser processes the content of span HTML tags as text containing span\-level elements\. .P Default: true Used by: kramdown parser .RE .TP \fB\-\-[no\-]remove\-block\-html\-tags\fP Remove block HTML tags .RS .P If this option is \fBtrue\fP, the RemoveHtmlTags converter removes block HTML tags\. .P Default: true Used by: RemoveHtmlTags converter .RE .TP \fB\-\-[no\-]remove\-span\-html\-tags\fP Remove span HTML tags .RS .P If this option is \fBtrue\fP, the RemoveHtmlTags converter removes span HTML tags\. .P Default: false Used by: RemoveHtmlTags converter .RE .TP \fB\-\-smart\-quotes\fP \fIARG\fP Defines the HTML entity names or code points for smart quote output .RS .P The entities identified by entity name or code point that should be used for, in order, a left single quote, a right single quote, a left double and a right double quote are specified by separating them with commas\. .P Default: lsquo,rsquo,ldquo,rdquo Used by: HTML/Latex converter .RE .TP \fB\-\-syntax\-highlighter\fP \fIARG\fP Set the syntax highlighter .RS .P Specifies the syntax highlighter that should be used for highlighting code blocks and spans\. If this option is set to +nil+, no syntax highlighting is done\. .P Options for the syntax highlighter can be set with the syntax_highlighter_opts configuration option\. .P Default: coderay Used by: HTML/Latex converter .RE .TP \fB\-\-syntax\-highlighter\-opts\fP \fIARG\fP Set the syntax highlighter options .RS .P Specifies options for the syntax highlighter set via the syntax_highlighter configuration option\. .P The value needs to be a hash with key\-value pairs that are understood by the used syntax highlighter\. .P Default: {} Used by: HTML/Latex converter .RE .TP \fB\-\-template\fP \fIARG\fP The name of an ERB template file that should be used to wrap the output or the ERB template itself\. .RS .P This is used to wrap the output in an environment so that the output can be used as a stand\-alone document\. For example, an HTML template would provide the needed header and body tags so that the whole output is a valid HTML file\. If no template is specified, the output will be just the converted text\. .P When resolving the template file, the given template name is used first\. If such a file is not found, the converter extension (the same as the converter name) is appended\. If the file still cannot be found, the templates name is interpreted as a template name that is provided by kramdown (without the converter extension)\. If the file is still not found, the template name is checked if it starts with \[u2018]string://\[u2019] and if it does, this prefix is removed and the rest is used as template content\. .P kramdown provides a default template named \[u2018]document\[u2019] for each converter\. .P Default: \[u2018]\[u2019] Used by: all converters .RE .TP \fB\-\-toc\-levels\fP \fIARG\fP Defines the levels that are used for the table of contents .RS .P The individual levels can be specified by separating them with commas (e\.g\. 1,2,3) or by using the range syntax (e\.g\. 1\.\.3)\. Only the specified levels are used for the table of contents\. .P Default: 1\.\.6 Used by: HTML/Latex converter .RE .TP \fB\-\-[no\-]transliterated\-header\-ids\fP Transliterate the header text before generating the ID .RS .P Only ASCII characters are used in headers IDs\. This is not good for languages with many non\-ASCII characters\. By enabling this option the header text is transliterated to ASCII as good as possible so that the resulting header ID is more useful\. .P The stringex library needs to be installed for this feature to work! .P Default: false Used by: HTML/Latex converter .RE .SH "EXIT STATUS" The exit status is 0 if no error happened\. Otherwise it is 1\. .SH "SEE ALSO" The kramdown website .UR http://kramdown\.gettalong\.org .UE for more information, especially on the supported input syntax\. .SH "AUTHOR" kramdown was written by Thomas Leitner .MT t_leitner@gmx\.at .UE \&\. .P This manual page was written by Thomas Leitner .MT t_leitner@gmx\.at .UE \&\. kramdown-1.15.0/AUTHORS0000644000004100000410000000007513164166452014532 0ustar www-datawww-dataThe author of kramdown is Thomas Leitner . kramdown-1.15.0/kramdown.gemspec0000644000004100000410000010163413164166452016654 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "kramdown" s.version = "1.15.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Thomas Leitner"] s.date = "2017-09-08" s.description = "kramdown is yet-another-markdown-parser but fast, pure Ruby,\nusing a strict syntax definition and supporting several common extensions.\n" s.email = "t_leitner@gmx.at" s.executables = ["kramdown"] s.files = ["AUTHORS", "CONTRIBUTERS", "COPYING", "README.md", "Rakefile", "VERSION", "benchmark/benchmark.rb", "benchmark/benchmark.sh", "benchmark/generate_data.rb", "benchmark/mdbasics.text", "benchmark/mdsyntax.text", "benchmark/testing.sh", "benchmark/timing.sh", "bin/kramdown", "data/kramdown/document.html", "data/kramdown/document.latex", "doc/_design.scss", "doc/bg.png", "doc/default.scss", "doc/default.template", "doc/documentation.page", "doc/documentation.template", "doc/index.page", "doc/installation.page", "doc/links.markdown", "doc/metainfo", "doc/news.feed", "doc/news.page", "doc/options.page", "doc/quickref.page", "doc/sidebar.template", "doc/sitemap.sitemap", "doc/syntax.page", "doc/tests.page", "doc/virtual", "lib/kramdown.rb", "lib/kramdown/converter.rb", "lib/kramdown/converter/base.rb", "lib/kramdown/converter/hash_ast.rb", "lib/kramdown/converter/html.rb", "lib/kramdown/converter/kramdown.rb", "lib/kramdown/converter/latex.rb", "lib/kramdown/converter/man.rb", "lib/kramdown/converter/math_engine/itex2mml.rb", "lib/kramdown/converter/math_engine/mathjax.rb", "lib/kramdown/converter/math_engine/mathjaxnode.rb", "lib/kramdown/converter/math_engine/ritex.rb", "lib/kramdown/converter/pdf.rb", "lib/kramdown/converter/remove_html_tags.rb", "lib/kramdown/converter/syntax_highlighter.rb", "lib/kramdown/converter/syntax_highlighter/coderay.rb", "lib/kramdown/converter/syntax_highlighter/minted.rb", "lib/kramdown/converter/syntax_highlighter/rouge.rb", "lib/kramdown/converter/toc.rb", "lib/kramdown/document.rb", "lib/kramdown/element.rb", "lib/kramdown/error.rb", "lib/kramdown/options.rb", "lib/kramdown/parser.rb", "lib/kramdown/parser/base.rb", "lib/kramdown/parser/gfm.rb", "lib/kramdown/parser/html.rb", "lib/kramdown/parser/kramdown.rb", "lib/kramdown/parser/kramdown/abbreviation.rb", "lib/kramdown/parser/kramdown/autolink.rb", "lib/kramdown/parser/kramdown/blank_line.rb", "lib/kramdown/parser/kramdown/block_boundary.rb", "lib/kramdown/parser/kramdown/blockquote.rb", "lib/kramdown/parser/kramdown/codeblock.rb", "lib/kramdown/parser/kramdown/codespan.rb", "lib/kramdown/parser/kramdown/emphasis.rb", "lib/kramdown/parser/kramdown/eob.rb", "lib/kramdown/parser/kramdown/escaped_chars.rb", "lib/kramdown/parser/kramdown/extensions.rb", "lib/kramdown/parser/kramdown/footnote.rb", "lib/kramdown/parser/kramdown/header.rb", "lib/kramdown/parser/kramdown/horizontal_rule.rb", "lib/kramdown/parser/kramdown/html.rb", "lib/kramdown/parser/kramdown/html_entity.rb", "lib/kramdown/parser/kramdown/line_break.rb", "lib/kramdown/parser/kramdown/link.rb", "lib/kramdown/parser/kramdown/list.rb", "lib/kramdown/parser/kramdown/math.rb", "lib/kramdown/parser/kramdown/paragraph.rb", "lib/kramdown/parser/kramdown/smart_quotes.rb", "lib/kramdown/parser/kramdown/table.rb", "lib/kramdown/parser/kramdown/typographic_symbol.rb", "lib/kramdown/parser/markdown.rb", "lib/kramdown/utils.rb", "lib/kramdown/utils/configurable.rb", "lib/kramdown/utils/entities.rb", "lib/kramdown/utils/html.rb", "lib/kramdown/utils/ordered_hash.rb", "lib/kramdown/utils/string_scanner.rb", "lib/kramdown/utils/unidecoder.rb", "lib/kramdown/version.rb", "man/man1/kramdown.1", "setup.rb", "test/run_tests.rb", "test/test_files.rb", "test/test_location.rb", "test/test_string_scanner_kramdown.rb", "test/testcases/block/01_blank_line/spaces.html", "test/testcases/block/01_blank_line/spaces.text", "test/testcases/block/01_blank_line/tabs.html", "test/testcases/block/01_blank_line/tabs.text", "test/testcases/block/02_eob/beginning.html", "test/testcases/block/02_eob/beginning.text", "test/testcases/block/02_eob/end.html", "test/testcases/block/02_eob/end.text", "test/testcases/block/02_eob/middle.html", "test/testcases/block/02_eob/middle.text", "test/testcases/block/03_paragraph/indented.html", "test/testcases/block/03_paragraph/indented.html.gfm", "test/testcases/block/03_paragraph/indented.text", "test/testcases/block/03_paragraph/no_newline_at_end.html", "test/testcases/block/03_paragraph/no_newline_at_end.text", "test/testcases/block/03_paragraph/one_para.html", "test/testcases/block/03_paragraph/one_para.text", "test/testcases/block/03_paragraph/two_para.html", "test/testcases/block/03_paragraph/two_para.text", "test/testcases/block/04_header/atx_header.html", "test/testcases/block/04_header/atx_header.text", "test/testcases/block/04_header/atx_header_no_newline_at_end.html", "test/testcases/block/04_header/atx_header_no_newline_at_end.text", "test/testcases/block/04_header/header_type_offset.html", "test/testcases/block/04_header/header_type_offset.kramdown", "test/testcases/block/04_header/header_type_offset.latex", "test/testcases/block/04_header/header_type_offset.options", "test/testcases/block/04_header/header_type_offset.text", "test/testcases/block/04_header/setext_header.html", "test/testcases/block/04_header/setext_header.text", "test/testcases/block/04_header/setext_header_no_newline_at_end.html", "test/testcases/block/04_header/setext_header_no_newline_at_end.text", "test/testcases/block/04_header/with_auto_id_prefix.html", "test/testcases/block/04_header/with_auto_id_prefix.options", "test/testcases/block/04_header/with_auto_id_prefix.text", "test/testcases/block/04_header/with_auto_id_stripping.html", "test/testcases/block/04_header/with_auto_id_stripping.options", "test/testcases/block/04_header/with_auto_id_stripping.text", "test/testcases/block/04_header/with_auto_ids.html", "test/testcases/block/04_header/with_auto_ids.options", "test/testcases/block/04_header/with_auto_ids.text", "test/testcases/block/05_blockquote/indented.html", "test/testcases/block/05_blockquote/indented.text", "test/testcases/block/05_blockquote/lazy.html", "test/testcases/block/05_blockquote/lazy.text", "test/testcases/block/05_blockquote/nested.html", "test/testcases/block/05_blockquote/nested.text", "test/testcases/block/05_blockquote/no_newline_at_end.html", "test/testcases/block/05_blockquote/no_newline_at_end.text", "test/testcases/block/05_blockquote/very_long_line.html", "test/testcases/block/05_blockquote/very_long_line.text", "test/testcases/block/05_blockquote/with_code_blocks.html", "test/testcases/block/05_blockquote/with_code_blocks.text", "test/testcases/block/06_codeblock/disable-highlighting.html", "test/testcases/block/06_codeblock/disable-highlighting.options", "test/testcases/block/06_codeblock/disable-highlighting.text", "test/testcases/block/06_codeblock/error.html", "test/testcases/block/06_codeblock/error.text", "test/testcases/block/06_codeblock/highlighting-minted-with-opts.latex", "test/testcases/block/06_codeblock/highlighting-minted-with-opts.options", "test/testcases/block/06_codeblock/highlighting-minted-with-opts.text", "test/testcases/block/06_codeblock/highlighting-minted.latex", "test/testcases/block/06_codeblock/highlighting-minted.options", "test/testcases/block/06_codeblock/highlighting-minted.text", "test/testcases/block/06_codeblock/highlighting-opts.html", "test/testcases/block/06_codeblock/highlighting-opts.options", "test/testcases/block/06_codeblock/highlighting-opts.text", "test/testcases/block/06_codeblock/highlighting.html", "test/testcases/block/06_codeblock/highlighting.options", "test/testcases/block/06_codeblock/highlighting.text", "test/testcases/block/06_codeblock/issue_gh45.html", "test/testcases/block/06_codeblock/issue_gh45.test", "test/testcases/block/06_codeblock/lazy.html", "test/testcases/block/06_codeblock/lazy.text", "test/testcases/block/06_codeblock/no_newline_at_end.html", "test/testcases/block/06_codeblock/no_newline_at_end.text", "test/testcases/block/06_codeblock/no_newline_at_end_1.html", "test/testcases/block/06_codeblock/no_newline_at_end_1.text", "test/testcases/block/06_codeblock/normal.html", "test/testcases/block/06_codeblock/normal.text", "test/testcases/block/06_codeblock/rouge/disabled.html", "test/testcases/block/06_codeblock/rouge/disabled.options", "test/testcases/block/06_codeblock/rouge/disabled.text", "test/testcases/block/06_codeblock/rouge/multiple.html", "test/testcases/block/06_codeblock/rouge/multiple.options", "test/testcases/block/06_codeblock/rouge/multiple.text", "test/testcases/block/06_codeblock/rouge/simple.html", "test/testcases/block/06_codeblock/rouge/simple.options", "test/testcases/block/06_codeblock/rouge/simple.text", "test/testcases/block/06_codeblock/tilde_syntax.html", "test/testcases/block/06_codeblock/tilde_syntax.text", "test/testcases/block/06_codeblock/whitespace.html", "test/testcases/block/06_codeblock/whitespace.text", "test/testcases/block/06_codeblock/with_blank_line.html", "test/testcases/block/06_codeblock/with_blank_line.text", "test/testcases/block/06_codeblock/with_eob_marker.html", "test/testcases/block/06_codeblock/with_eob_marker.text", "test/testcases/block/06_codeblock/with_ial.html", "test/testcases/block/06_codeblock/with_ial.text", "test/testcases/block/06_codeblock/with_lang_in_fenced_block.html", "test/testcases/block/06_codeblock/with_lang_in_fenced_block.options", "test/testcases/block/06_codeblock/with_lang_in_fenced_block.text", "test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.html", "test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.options", "test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.text", "test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.html", "test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.options", "test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.text", "test/testcases/block/07_horizontal_rule/error.html", "test/testcases/block/07_horizontal_rule/error.html.19", "test/testcases/block/07_horizontal_rule/error.text", "test/testcases/block/07_horizontal_rule/normal.html", "test/testcases/block/07_horizontal_rule/normal.text", "test/testcases/block/07_horizontal_rule/sepspaces.html", "test/testcases/block/07_horizontal_rule/sepspaces.text", "test/testcases/block/07_horizontal_rule/septabs.html", "test/testcases/block/07_horizontal_rule/septabs.text", "test/testcases/block/08_list/brackets_in_item.latex", "test/testcases/block/08_list/brackets_in_item.text", "test/testcases/block/08_list/escaping.html", "test/testcases/block/08_list/escaping.text", "test/testcases/block/08_list/item_ial.html", "test/testcases/block/08_list/item_ial.text", "test/testcases/block/08_list/lazy.html", "test/testcases/block/08_list/lazy.text", "test/testcases/block/08_list/lazy_and_nested.html", "test/testcases/block/08_list/lazy_and_nested.text", "test/testcases/block/08_list/list_and_hr.html", "test/testcases/block/08_list/list_and_hr.text", "test/testcases/block/08_list/list_and_others.html", "test/testcases/block/08_list/list_and_others.text", "test/testcases/block/08_list/mixed.html", "test/testcases/block/08_list/mixed.text", "test/testcases/block/08_list/nested.html", "test/testcases/block/08_list/nested.text", "test/testcases/block/08_list/other_first_element.html", "test/testcases/block/08_list/other_first_element.text", "test/testcases/block/08_list/simple_ol.html", "test/testcases/block/08_list/simple_ol.text", "test/testcases/block/08_list/simple_ul.html", "test/testcases/block/08_list/simple_ul.text", "test/testcases/block/08_list/single_item.html", "test/testcases/block/08_list/single_item.text", "test/testcases/block/08_list/special_cases.html", "test/testcases/block/08_list/special_cases.text", "test/testcases/block/09_html/comment.html", "test/testcases/block/09_html/comment.text", "test/testcases/block/09_html/content_model/deflists.html", "test/testcases/block/09_html/content_model/deflists.options", "test/testcases/block/09_html/content_model/deflists.text", "test/testcases/block/09_html/content_model/tables.html", "test/testcases/block/09_html/content_model/tables.options", "test/testcases/block/09_html/content_model/tables.text", "test/testcases/block/09_html/html5_attributes.html", "test/testcases/block/09_html/html5_attributes.text", "test/testcases/block/09_html/html_after_block.html", "test/testcases/block/09_html/html_after_block.text", "test/testcases/block/09_html/html_and_codeblocks.html", "test/testcases/block/09_html/html_and_codeblocks.options", "test/testcases/block/09_html/html_and_codeblocks.text", "test/testcases/block/09_html/html_and_headers.html", "test/testcases/block/09_html/html_and_headers.text", "test/testcases/block/09_html/html_to_native/code.html", "test/testcases/block/09_html/html_to_native/code.text", "test/testcases/block/09_html/html_to_native/comment.html", "test/testcases/block/09_html/html_to_native/comment.text", "test/testcases/block/09_html/html_to_native/emphasis.html", "test/testcases/block/09_html/html_to_native/emphasis.text", "test/testcases/block/09_html/html_to_native/entity.html", "test/testcases/block/09_html/html_to_native/entity.text", "test/testcases/block/09_html/html_to_native/header.html", "test/testcases/block/09_html/html_to_native/header.options", "test/testcases/block/09_html/html_to_native/header.text", "test/testcases/block/09_html/html_to_native/list_dl.html", "test/testcases/block/09_html/html_to_native/list_dl.text", "test/testcases/block/09_html/html_to_native/list_ol.html", "test/testcases/block/09_html/html_to_native/list_ol.text", "test/testcases/block/09_html/html_to_native/list_ul.html", "test/testcases/block/09_html/html_to_native/list_ul.text", "test/testcases/block/09_html/html_to_native/options", "test/testcases/block/09_html/html_to_native/paragraph.html", "test/testcases/block/09_html/html_to_native/paragraph.text", "test/testcases/block/09_html/html_to_native/table_normal.html", "test/testcases/block/09_html/html_to_native/table_normal.text", "test/testcases/block/09_html/html_to_native/table_simple.html", "test/testcases/block/09_html/html_to_native/table_simple.text", "test/testcases/block/09_html/html_to_native/typography.html", "test/testcases/block/09_html/html_to_native/typography.html.19", "test/testcases/block/09_html/html_to_native/typography.text", "test/testcases/block/09_html/invalid_html_1.html", "test/testcases/block/09_html/invalid_html_1.text", "test/testcases/block/09_html/invalid_html_2.html", "test/testcases/block/09_html/invalid_html_2.text", "test/testcases/block/09_html/markdown_attr.html", "test/testcases/block/09_html/markdown_attr.text", "test/testcases/block/09_html/not_parsed.html", "test/testcases/block/09_html/not_parsed.text", "test/testcases/block/09_html/parse_as_raw.html", "test/testcases/block/09_html/parse_as_raw.htmlinput", "test/testcases/block/09_html/parse_as_raw.options", "test/testcases/block/09_html/parse_as_raw.text", "test/testcases/block/09_html/parse_as_span.html", "test/testcases/block/09_html/parse_as_span.htmlinput", "test/testcases/block/09_html/parse_as_span.options", "test/testcases/block/09_html/parse_as_span.text", "test/testcases/block/09_html/parse_block_html.html", "test/testcases/block/09_html/parse_block_html.options", "test/testcases/block/09_html/parse_block_html.text", "test/testcases/block/09_html/processing_instruction.html", "test/testcases/block/09_html/processing_instruction.text", "test/testcases/block/09_html/simple.html", "test/testcases/block/09_html/simple.html.19", "test/testcases/block/09_html/simple.options", "test/testcases/block/09_html/simple.text", "test/testcases/block/09_html/textarea.html", "test/testcases/block/09_html/textarea.text", "test/testcases/block/09_html/xml.html", "test/testcases/block/09_html/xml.text", "test/testcases/block/10_ald/simple.html", "test/testcases/block/10_ald/simple.text", "test/testcases/block/11_ial/auto_id_and_ial.html", "test/testcases/block/11_ial/auto_id_and_ial.options", "test/testcases/block/11_ial/auto_id_and_ial.text", "test/testcases/block/11_ial/nested.html", "test/testcases/block/11_ial/nested.text", "test/testcases/block/11_ial/simple.html", "test/testcases/block/11_ial/simple.text", "test/testcases/block/12_extension/comment.html", "test/testcases/block/12_extension/comment.text", "test/testcases/block/12_extension/ignored.html", "test/testcases/block/12_extension/ignored.text", "test/testcases/block/12_extension/nomarkdown.html", "test/testcases/block/12_extension/nomarkdown.kramdown", "test/testcases/block/12_extension/nomarkdown.latex", "test/testcases/block/12_extension/nomarkdown.text", "test/testcases/block/12_extension/options.html", "test/testcases/block/12_extension/options.text", "test/testcases/block/12_extension/options2.html", "test/testcases/block/12_extension/options2.text", "test/testcases/block/12_extension/options3.html", "test/testcases/block/12_extension/options3.text", "test/testcases/block/13_definition_list/auto_ids.html", "test/testcases/block/13_definition_list/auto_ids.text", "test/testcases/block/13_definition_list/definition_at_beginning.html", "test/testcases/block/13_definition_list/definition_at_beginning.text", "test/testcases/block/13_definition_list/deflist_ial.html", "test/testcases/block/13_definition_list/deflist_ial.text", "test/testcases/block/13_definition_list/item_ial.html", "test/testcases/block/13_definition_list/item_ial.text", "test/testcases/block/13_definition_list/multiple_terms.html", "test/testcases/block/13_definition_list/multiple_terms.text", "test/testcases/block/13_definition_list/no_def_list.html", "test/testcases/block/13_definition_list/no_def_list.text", "test/testcases/block/13_definition_list/para_wrapping.html", "test/testcases/block/13_definition_list/para_wrapping.text", "test/testcases/block/13_definition_list/separated_by_eob.html", "test/testcases/block/13_definition_list/separated_by_eob.text", "test/testcases/block/13_definition_list/simple.html", "test/testcases/block/13_definition_list/simple.text", "test/testcases/block/13_definition_list/styled_terms.html", "test/testcases/block/13_definition_list/styled_terms.text", "test/testcases/block/13_definition_list/too_much_space.html", "test/testcases/block/13_definition_list/too_much_space.text", "test/testcases/block/13_definition_list/with_blocks.html", "test/testcases/block/13_definition_list/with_blocks.text", "test/testcases/block/14_table/errors.html", "test/testcases/block/14_table/errors.text", "test/testcases/block/14_table/escaping.html", "test/testcases/block/14_table/escaping.text", "test/testcases/block/14_table/footer.html", "test/testcases/block/14_table/footer.text", "test/testcases/block/14_table/header.html", "test/testcases/block/14_table/header.text", "test/testcases/block/14_table/no_table.html", "test/testcases/block/14_table/no_table.text", "test/testcases/block/14_table/simple.html", "test/testcases/block/14_table/simple.html.19", "test/testcases/block/14_table/simple.text", "test/testcases/block/14_table/table_with_footnote.html", "test/testcases/block/14_table/table_with_footnote.latex", "test/testcases/block/14_table/table_with_footnote.text", "test/testcases/block/15_math/gh_128.html", "test/testcases/block/15_math/gh_128.text", "test/testcases/block/15_math/itex2mml.html", "test/testcases/block/15_math/itex2mml.options", "test/testcases/block/15_math/itex2mml.text", "test/testcases/block/15_math/mathjax_preview.html", "test/testcases/block/15_math/mathjax_preview.options", "test/testcases/block/15_math/mathjax_preview.text", "test/testcases/block/15_math/mathjax_preview_as_code.html", "test/testcases/block/15_math/mathjax_preview_as_code.options", "test/testcases/block/15_math/mathjax_preview_as_code.text", "test/testcases/block/15_math/mathjax_preview_simple.html", "test/testcases/block/15_math/mathjax_preview_simple.options", "test/testcases/block/15_math/mathjax_preview_simple.text", "test/testcases/block/15_math/mathjaxnode.html.19", "test/testcases/block/15_math/mathjaxnode.options", "test/testcases/block/15_math/mathjaxnode.text", "test/testcases/block/15_math/mathjaxnode_notexhints.html.19", "test/testcases/block/15_math/mathjaxnode_notexhints.options", "test/testcases/block/15_math/mathjaxnode_notexhints.text", "test/testcases/block/15_math/mathjaxnode_semantics.html.19", "test/testcases/block/15_math/mathjaxnode_semantics.options", "test/testcases/block/15_math/mathjaxnode_semantics.text", "test/testcases/block/15_math/no_engine.html", "test/testcases/block/15_math/no_engine.options", "test/testcases/block/15_math/no_engine.text", "test/testcases/block/15_math/normal.html", "test/testcases/block/15_math/normal.text", "test/testcases/block/15_math/ritex.html", "test/testcases/block/15_math/ritex.options", "test/testcases/block/15_math/ritex.text", "test/testcases/block/16_toc/no_toc.html", "test/testcases/block/16_toc/no_toc.text", "test/testcases/block/16_toc/toc_exclude.html", "test/testcases/block/16_toc/toc_exclude.options", "test/testcases/block/16_toc/toc_exclude.text", "test/testcases/block/16_toc/toc_levels.html", "test/testcases/block/16_toc/toc_levels.options", "test/testcases/block/16_toc/toc_levels.text", "test/testcases/block/16_toc/toc_with_footnotes.html", "test/testcases/block/16_toc/toc_with_footnotes.options", "test/testcases/block/16_toc/toc_with_footnotes.text", "test/testcases/block/16_toc/toc_with_links.html", "test/testcases/block/16_toc/toc_with_links.options", "test/testcases/block/16_toc/toc_with_links.text", "test/testcases/encoding.html", "test/testcases/encoding.text", "test/testcases/man/example.man", "test/testcases/man/example.text", "test/testcases/man/heading-name-dash-description.man", "test/testcases/man/heading-name-dash-description.text", "test/testcases/man/heading-name-description.man", "test/testcases/man/heading-name-description.text", "test/testcases/man/heading-name-section-description.man", "test/testcases/man/heading-name-section-description.text", "test/testcases/man/heading-name-section.man", "test/testcases/man/heading-name-section.text", "test/testcases/man/heading-name.man", "test/testcases/man/heading-name.text", "test/testcases/man/sections.man", "test/testcases/man/sections.text", "test/testcases/man/text-escaping.man", "test/testcases/man/text-escaping.text", "test/testcases/span/01_link/empty.html", "test/testcases/span/01_link/empty.text", "test/testcases/span/01_link/empty_title.htmlinput", "test/testcases/span/01_link/empty_title.text", "test/testcases/span/01_link/image_in_a.html", "test/testcases/span/01_link/image_in_a.text", "test/testcases/span/01_link/imagelinks.html", "test/testcases/span/01_link/imagelinks.text", "test/testcases/span/01_link/inline.html", "test/testcases/span/01_link/inline.html.19", "test/testcases/span/01_link/inline.text", "test/testcases/span/01_link/latex_escaping.latex", "test/testcases/span/01_link/latex_escaping.text", "test/testcases/span/01_link/link_defs.html", "test/testcases/span/01_link/link_defs.text", "test/testcases/span/01_link/link_defs_with_ial.html", "test/testcases/span/01_link/link_defs_with_ial.text", "test/testcases/span/01_link/links_with_angle_brackets.html", "test/testcases/span/01_link/links_with_angle_brackets.text", "test/testcases/span/01_link/reference.html", "test/testcases/span/01_link/reference.html.19", "test/testcases/span/01_link/reference.options", "test/testcases/span/01_link/reference.text", "test/testcases/span/02_emphasis/empty.html", "test/testcases/span/02_emphasis/empty.text", "test/testcases/span/02_emphasis/errors.html", "test/testcases/span/02_emphasis/errors.text", "test/testcases/span/02_emphasis/nesting.html", "test/testcases/span/02_emphasis/nesting.text", "test/testcases/span/02_emphasis/normal.html", "test/testcases/span/02_emphasis/normal.options", "test/testcases/span/02_emphasis/normal.text", "test/testcases/span/03_codespan/empty.html", "test/testcases/span/03_codespan/empty.text", "test/testcases/span/03_codespan/errors.html", "test/testcases/span/03_codespan/errors.text", "test/testcases/span/03_codespan/highlighting-minted.latex", "test/testcases/span/03_codespan/highlighting-minted.options", "test/testcases/span/03_codespan/highlighting-minted.text", "test/testcases/span/03_codespan/highlighting.html", "test/testcases/span/03_codespan/highlighting.text", "test/testcases/span/03_codespan/normal.html", "test/testcases/span/03_codespan/normal.text", "test/testcases/span/03_codespan/rouge/disabled.html", "test/testcases/span/03_codespan/rouge/disabled.options", "test/testcases/span/03_codespan/rouge/disabled.text", "test/testcases/span/03_codespan/rouge/simple.html", "test/testcases/span/03_codespan/rouge/simple.options", "test/testcases/span/03_codespan/rouge/simple.text", "test/testcases/span/04_footnote/backlink_text.html", "test/testcases/span/04_footnote/backlink_text.options", "test/testcases/span/04_footnote/backlink_text.text", "test/testcases/span/04_footnote/definitions.html", "test/testcases/span/04_footnote/definitions.latex", "test/testcases/span/04_footnote/definitions.text", "test/testcases/span/04_footnote/footnote_nr.html", "test/testcases/span/04_footnote/footnote_nr.latex", "test/testcases/span/04_footnote/footnote_nr.options", "test/testcases/span/04_footnote/footnote_nr.text", "test/testcases/span/04_footnote/inside_footnote.html", "test/testcases/span/04_footnote/inside_footnote.text", "test/testcases/span/04_footnote/markers.html", "test/testcases/span/04_footnote/markers.latex", "test/testcases/span/04_footnote/markers.options", "test/testcases/span/04_footnote/markers.text", "test/testcases/span/04_footnote/placement.html", "test/testcases/span/04_footnote/placement.options", "test/testcases/span/04_footnote/placement.text", "test/testcases/span/04_footnote/regexp_problem.html", "test/testcases/span/04_footnote/regexp_problem.options", "test/testcases/span/04_footnote/regexp_problem.text", "test/testcases/span/04_footnote/without_backlink.html", "test/testcases/span/04_footnote/without_backlink.options", "test/testcases/span/04_footnote/without_backlink.text", "test/testcases/span/05_html/across_lines.html", "test/testcases/span/05_html/across_lines.text", "test/testcases/span/05_html/button.html", "test/testcases/span/05_html/button.text", "test/testcases/span/05_html/invalid.html", "test/testcases/span/05_html/invalid.text", "test/testcases/span/05_html/link_with_mailto.html", "test/testcases/span/05_html/link_with_mailto.text", "test/testcases/span/05_html/mark_element.html", "test/testcases/span/05_html/mark_element.text", "test/testcases/span/05_html/markdown_attr.html", "test/testcases/span/05_html/markdown_attr.text", "test/testcases/span/05_html/normal.html", "test/testcases/span/05_html/normal.text", "test/testcases/span/05_html/raw_span_elements.html", "test/testcases/span/05_html/raw_span_elements.text", "test/testcases/span/05_html/xml.html", "test/testcases/span/05_html/xml.text", "test/testcases/span/abbreviations/abbrev.html", "test/testcases/span/abbreviations/abbrev.text", "test/testcases/span/abbreviations/abbrev_defs.html", "test/testcases/span/abbreviations/abbrev_defs.text", "test/testcases/span/abbreviations/in_footnote.html", "test/testcases/span/abbreviations/in_footnote.text", "test/testcases/span/autolinks/url_links.html", "test/testcases/span/autolinks/url_links.text", "test/testcases/span/escaped_chars/normal.html", "test/testcases/span/escaped_chars/normal.text", "test/testcases/span/extension/comment.html", "test/testcases/span/extension/comment.text", "test/testcases/span/extension/ignored.html", "test/testcases/span/extension/ignored.text", "test/testcases/span/extension/nomarkdown.html", "test/testcases/span/extension/nomarkdown.text", "test/testcases/span/extension/options.html", "test/testcases/span/extension/options.text", "test/testcases/span/ial/simple.html", "test/testcases/span/ial/simple.text", "test/testcases/span/line_breaks/normal.html", "test/testcases/span/line_breaks/normal.latex", "test/testcases/span/line_breaks/normal.text", "test/testcases/span/math/itex2mml.html", "test/testcases/span/math/itex2mml.options", "test/testcases/span/math/itex2mml.text", "test/testcases/span/math/mathjaxnode.html.19", "test/testcases/span/math/mathjaxnode.options", "test/testcases/span/math/mathjaxnode.text", "test/testcases/span/math/no_engine.html", "test/testcases/span/math/no_engine.options", "test/testcases/span/math/no_engine.text", "test/testcases/span/math/normal.html", "test/testcases/span/math/normal.text", "test/testcases/span/math/ritex.html", "test/testcases/span/math/ritex.options", "test/testcases/span/math/ritex.text", "test/testcases/span/text_substitutions/entities.html", "test/testcases/span/text_substitutions/entities.options", "test/testcases/span/text_substitutions/entities.text", "test/testcases/span/text_substitutions/entities_as_char.html", "test/testcases/span/text_substitutions/entities_as_char.html.19", "test/testcases/span/text_substitutions/entities_as_char.options", "test/testcases/span/text_substitutions/entities_as_char.text", "test/testcases/span/text_substitutions/entities_as_input.html", "test/testcases/span/text_substitutions/entities_as_input.options", "test/testcases/span/text_substitutions/entities_as_input.text", "test/testcases/span/text_substitutions/entities_numeric.html", "test/testcases/span/text_substitutions/entities_numeric.options", "test/testcases/span/text_substitutions/entities_numeric.text", "test/testcases/span/text_substitutions/entities_symbolic.html", "test/testcases/span/text_substitutions/entities_symbolic.options", "test/testcases/span/text_substitutions/entities_symbolic.text", "test/testcases/span/text_substitutions/greaterthan.html", "test/testcases/span/text_substitutions/greaterthan.text", "test/testcases/span/text_substitutions/lowerthan.html", "test/testcases/span/text_substitutions/lowerthan.text", "test/testcases/span/text_substitutions/typography.html", "test/testcases/span/text_substitutions/typography.options", "test/testcases/span/text_substitutions/typography.text", "test/testcases_gfm/atx_header.html", "test/testcases_gfm/atx_header.text", "test/testcases_gfm/backticks_disable_highlighting.html", "test/testcases_gfm/backticks_disable_highlighting.options", "test/testcases_gfm/backticks_disable_highlighting.text", "test/testcases_gfm/backticks_syntax.html", "test/testcases_gfm/backticks_syntax.text", "test/testcases_gfm/codeblock_fenced.html", "test/testcases_gfm/codeblock_fenced.options", "test/testcases_gfm/codeblock_fenced.text", "test/testcases_gfm/hard_line_breaks.html", "test/testcases_gfm/hard_line_breaks.text", "test/testcases_gfm/hard_line_breaks_off.html", "test/testcases_gfm/hard_line_breaks_off.options", "test/testcases_gfm/hard_line_breaks_off.text", "test/testcases_gfm/header_ids.html", "test/testcases_gfm/header_ids.html.19", "test/testcases_gfm/header_ids.options", "test/testcases_gfm/header_ids.text", "test/testcases_gfm/header_ids_with_prefix.html", "test/testcases_gfm/header_ids_with_prefix.options", "test/testcases_gfm/header_ids_with_prefix.text", "test/testcases_gfm/paragraph_end-disabled.html", "test/testcases_gfm/paragraph_end-disabled.options", "test/testcases_gfm/paragraph_end-disabled.text", "test/testcases_gfm/paragraph_end.html", "test/testcases_gfm/paragraph_end.text", "test/testcases_gfm/strikethrough.html", "test/testcases_gfm/strikethrough.html.19", "test/testcases_gfm/strikethrough.text", "test/testcases_gfm/two_para_hard_line_breaks.html", "test/testcases_gfm/two_para_hard_line_breaks.text"] s.homepage = "http://kramdown.gettalong.org" s.licenses = ["MIT"] s.rdoc_options = ["--main", "lib/kramdown/document.rb"] s.require_paths = ["lib"] s.required_ruby_version = Gem::Requirement.new(">= 2.0") s.rubygems_version = "1.8.23" s.summary = "kramdown is a fast, pure-Ruby Markdown-superset converter." if s.respond_to? :specification_version then s.specification_version = 4 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q, ["~> 1.0.0"]) s.add_development_dependency(%q, ["~> 1.5"]) s.add_development_dependency(%q, ["~> 5.0"]) s.add_development_dependency(%q, ["~> 2.0"]) s.add_development_dependency(%q, ["~> 0.2.2"]) s.add_development_dependency(%q, ["~> 1.0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, ["~> 1.5.1"]) else s.add_dependency(%q, ["~> 1.0.0"]) s.add_dependency(%q, ["~> 1.5"]) s.add_dependency(%q, ["~> 5.0"]) s.add_dependency(%q, ["~> 2.0"]) s.add_dependency(%q, ["~> 0.2.2"]) s.add_dependency(%q, ["~> 1.0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 1.5.1"]) end else s.add_dependency(%q, ["~> 1.0.0"]) s.add_dependency(%q, ["~> 1.5"]) s.add_dependency(%q, ["~> 5.0"]) s.add_dependency(%q, ["~> 2.0"]) s.add_dependency(%q, ["~> 0.2.2"]) s.add_dependency(%q, ["~> 1.0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 1.5.1"]) end end kramdown-1.15.0/setup.rb0000644000004100000410000010650413164166452015153 0ustar www-datawww-data# # setup.rb # # Copyright (c) 2000-2005 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # unless Enumerable.method_defined?(:map) # Ruby 1.4.6 module Enumerable alias map collect end end unless File.respond_to?(:read) # Ruby 1.6 def File.read(fname) open(fname) {|f| return f.read } end end unless Errno.const_defined?(:ENOTEMPTY) # Windows? module Errno class ENOTEMPTY # We do not raise this exception, implementation is not needed. end end end def File.binread(fname) open(fname, 'rb') {|f| return f.read } end # for corrupted Windows' stat(2) def File.dir?(path) File.directory?((path[-1,1] == '/') ? path : path + '/') end class ConfigTable include Enumerable def initialize(rbconfig) @rbconfig = rbconfig @items = [] @table = {} # options @install_prefix = nil @config_opt = nil @verbose = true @no_harm = false end attr_accessor :install_prefix attr_accessor :config_opt attr_writer :verbose def verbose? @verbose end attr_writer :no_harm def no_harm? @no_harm end def [](key) lookup(key).resolve(self) end def []=(key, val) lookup(key).set val end def names @items.map {|i| i.name } end def each(&block) @items.each(&block) end def key?(name) @table.key?(name) end def lookup(name) @table[name] or setup_rb_error "no such config item: #{name}" end def add(item) @items.push item @table[item.name] = item end def remove(name) item = lookup(name) @items.delete_if {|i| i.name == name } @table.delete_if {|name, i| i.name == name } item end def load_script(path, inst = nil) if File.file?(path) MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path end end def savefile '.config' end def load_savefile begin File.foreach(savefile()) do |line| k, v = *line.split(/=/, 2) self[k] = v.strip end rescue Errno::ENOENT setup_rb_error $!.message + "\n#{File.basename($0)} config first" end end def save @items.each {|i| i.value } File.open(savefile(), 'w') {|f| @items.each do |i| f.printf "%s=%s\n", i.name, i.value if i.value? and i.value end } end def load_standard_entries standard_entries(@rbconfig).each do |ent| add ent end end def standard_entries(rbconfig) c = rbconfig rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT']) major = c['MAJOR'].to_i minor = c['MINOR'].to_i teeny = c['TEENY'].to_i version = "#{major}.#{minor}" # ruby ver. >= 1.4.4? newpath_p = ((major >= 2) or ((major == 1) and ((minor >= 5) or ((minor == 4) and (teeny >= 4))))) if c['rubylibdir'] # V > 1.6.3 libruby = "#{c['prefix']}/lib/ruby" librubyver = c['rubylibdir'] librubyverarch = c['archdir'] siteruby = c['sitedir'] siterubyver = c['sitelibdir'] siterubyverarch = c['sitearchdir'] elsif newpath_p # 1.4.4 <= V <= 1.6.3 libruby = "#{c['prefix']}/lib/ruby" librubyver = "#{c['prefix']}/lib/ruby/#{version}" librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" siteruby = c['sitedir'] siterubyver = "$siteruby/#{version}" siterubyverarch = "$siterubyver/#{c['arch']}" else # V < 1.4.4 libruby = "#{c['prefix']}/lib/ruby" librubyver = "#{c['prefix']}/lib/ruby/#{version}" librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" siteruby = "#{c['prefix']}/lib/ruby/#{version}/site_ruby" siterubyver = siteruby siterubyverarch = "$siterubyver/#{c['arch']}" end parameterize = lambda {|path| path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix') } if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg } makeprog = arg.sub(/'/, '').split(/=/, 2)[1] else makeprog = 'make' end [ ExecItem.new('installdirs', 'std/site/home', 'std: install under libruby; site: install under site_ruby; home: install under $HOME')\ {|val, table| case val when 'std' table['rbdir'] = '$librubyver' table['sodir'] = '$librubyverarch' when 'site' table['rbdir'] = '$siterubyver' table['sodir'] = '$siterubyverarch' when 'home' setup_rb_error '$HOME was not set' unless ENV['HOME'] table['prefix'] = ENV['HOME'] table['rbdir'] = '$libdir/ruby' table['sodir'] = '$libdir/ruby' end }, PathItem.new('prefix', 'path', c['prefix'], 'path prefix of target environment'), PathItem.new('bindir', 'path', parameterize.call(c['bindir']), 'the directory for commands'), PathItem.new('libdir', 'path', parameterize.call(c['libdir']), 'the directory for libraries'), PathItem.new('datadir', 'path', parameterize.call(c['datadir']), 'the directory for shared data'), PathItem.new('mandir', 'path', parameterize.call(c['mandir']), 'the directory for man pages'), PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']), 'the directory for system configuration files'), PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']), 'the directory for local state data'), PathItem.new('libruby', 'path', libruby, 'the directory for ruby libraries'), PathItem.new('librubyver', 'path', librubyver, 'the directory for standard ruby libraries'), PathItem.new('librubyverarch', 'path', librubyverarch, 'the directory for standard ruby extensions'), PathItem.new('siteruby', 'path', siteruby, 'the directory for version-independent aux ruby libraries'), PathItem.new('siterubyver', 'path', siterubyver, 'the directory for aux ruby libraries'), PathItem.new('siterubyverarch', 'path', siterubyverarch, 'the directory for aux ruby binaries'), PathItem.new('rbdir', 'path', '$siterubyver', 'the directory for ruby scripts'), PathItem.new('sodir', 'path', '$siterubyverarch', 'the directory for ruby extentions'), PathItem.new('rubypath', 'path', rubypath, 'the path to set to #! line'), ProgramItem.new('rubyprog', 'name', rubypath, 'the ruby program using for installation'), ProgramItem.new('makeprog', 'name', makeprog, 'the make program to compile ruby extentions'), SelectItem.new('shebang', 'all/ruby/never', 'ruby', 'shebang line (#!) editing mode'), BoolItem.new('without-ext', 'yes/no', 'no', 'does not compile/install ruby extentions') ] end private :standard_entries def load_multipackage_entries multipackage_entries().each do |ent| add ent end end def multipackage_entries [ PackageSelectionItem.new('with', 'name,name...', '', 'ALL', 'package names that you want to install'), PackageSelectionItem.new('without', 'name,name...', '', 'NONE', 'package names that you do not want to install') ] end private :multipackage_entries ALIASES = { 'std-ruby' => 'librubyver', 'stdruby' => 'librubyver', 'rubylibdir' => 'librubyver', 'archdir' => 'librubyverarch', 'site-ruby-common' => 'siteruby', # For backward compatibility 'site-ruby' => 'siterubyver', # For backward compatibility 'bin-dir' => 'bindir', 'bin-dir' => 'bindir', 'rb-dir' => 'rbdir', 'so-dir' => 'sodir', 'data-dir' => 'datadir', 'ruby-path' => 'rubypath', 'ruby-prog' => 'rubyprog', 'ruby' => 'rubyprog', 'make-prog' => 'makeprog', 'make' => 'makeprog' } def fixup ALIASES.each do |ali, name| @table[ali] = @table[name] end @items.freeze @table.freeze @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/ end def parse_opt(opt) m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}" m.to_a[1,2] end def dllext @rbconfig['DLEXT'] end def value_config?(name) lookup(name).value? end class Item def initialize(name, template, default, desc) @name = name.freeze @template = template @value = default @default = default @description = desc end attr_reader :name attr_reader :description attr_accessor :default alias help_default default def help_opt "--#{@name}=#{@template}" end def value? true end def value @value end def resolve(table) @value.gsub(%r<\$([^/]+)>) { table[$1] } end def set(val) @value = check(val) end private def check(val) setup_rb_error "config: --#{name} requires argument" unless val val end end class BoolItem < Item def config_type 'bool' end def help_opt "--#{@name}" end private def check(val) return 'yes' unless val case val when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes' when /\An(o)?\z/i, /\Af(alse)\z/i then 'no' else setup_rb_error "config: --#{@name} accepts only yes/no for argument" end end end class PathItem < Item def config_type 'path' end private def check(path) setup_rb_error "config: --#{@name} requires argument" unless path path[0,1] == '$' ? path : File.expand_path(path) end end class ProgramItem < Item def config_type 'program' end end class SelectItem < Item def initialize(name, selection, default, desc) super @ok = selection.split('/') end def config_type 'select' end private def check(val) unless @ok.include?(val.strip) setup_rb_error "config: use --#{@name}=#{@template} (#{val})" end val.strip end end class ExecItem < Item def initialize(name, selection, desc, &block) super name, selection, nil, desc @ok = selection.split('/') @action = block end def config_type 'exec' end def value? false end def resolve(table) setup_rb_error "$#{name()} wrongly used as option value" end undef set def evaluate(val, table) v = val.strip.downcase unless @ok.include?(v) setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})" end @action.call v, table end end class PackageSelectionItem < Item def initialize(name, template, default, help_default, desc) super name, template, default, desc @help_default = help_default end attr_reader :help_default def config_type 'package' end private def check(val) unless File.dir?("packages/#{val}") setup_rb_error "config: no such package: #{val}" end val end end class MetaConfigEnvironment def initialize(config, installer) @config = config @installer = installer end def config_names @config.names end def config?(name) @config.key?(name) end def bool_config?(name) @config.lookup(name).config_type == 'bool' end def path_config?(name) @config.lookup(name).config_type == 'path' end def value_config?(name) @config.lookup(name).config_type != 'exec' end def add_config(item) @config.add item end def add_bool_config(name, default, desc) @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc) end def add_path_config(name, default, desc) @config.add PathItem.new(name, 'path', default, desc) end def set_config_default(name, default) @config.lookup(name).default = default end def remove_config(name) @config.remove(name) end # For only multipackage def packages raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer @installer.packages end # For only multipackage def declare_packages(list) raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer @installer.packages = list end end end # class ConfigTable # This module requires: #verbose?, #no_harm? module FileOperations def mkdir_p(dirname, prefix = nil) dirname = prefix + File.expand_path(dirname) if prefix $stderr.puts "mkdir -p #{dirname}" if verbose? return if no_harm? # Does not check '/', it's too abnormal. dirs = File.expand_path(dirname).split(%r<(?=/)>) if /\A[a-z]:\z/i =~ dirs[0] disk = dirs.shift dirs[0] = disk + dirs[0] end dirs.each_index do |idx| path = dirs[0..idx].join('') Dir.mkdir path unless File.dir?(path) end end def rm_f(path) $stderr.puts "rm -f #{path}" if verbose? return if no_harm? force_remove_file path end def rm_rf(path) $stderr.puts "rm -rf #{path}" if verbose? return if no_harm? remove_tree path end def remove_tree(path) if File.symlink?(path) remove_file path elsif File.dir?(path) remove_tree0 path else force_remove_file path end end def remove_tree0(path) Dir.foreach(path) do |ent| next if ent == '.' next if ent == '..' entpath = "#{path}/#{ent}" if File.symlink?(entpath) remove_file entpath elsif File.dir?(entpath) remove_tree0 entpath else force_remove_file entpath end end begin Dir.rmdir path rescue Errno::ENOTEMPTY # directory may not be empty end end def move_file(src, dest) force_remove_file dest begin File.rename src, dest rescue File.open(dest, 'wb') {|f| f.write File.binread(src) } File.chmod File.stat(src).mode, dest File.unlink src end end def force_remove_file(path) begin remove_file path rescue end end def remove_file(path) File.chmod 0777, path File.unlink path end def install(from, dest, mode, prefix = nil) $stderr.puts "install #{from} #{dest}" if verbose? return if no_harm? realdest = prefix ? prefix + File.expand_path(dest) : dest realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest) str = File.binread(from) if diff?(str, realdest) verbose_off { rm_f realdest if File.exist?(realdest) } File.open(realdest, 'wb') {|f| f.write str } File.chmod mode, realdest File.open("#{objdir_root()}/InstalledFiles", 'a') {|f| if prefix f.puts realdest.sub(prefix, '') else f.puts realdest end } end end def diff?(new_content, path) return true unless File.exist?(path) new_content != File.binread(path) end def command(*args) $stderr.puts args.join(' ') if verbose? system(*args) or raise RuntimeError, "system(#{args.map{|a| a.inspect }.join(' ')}) failed" end def ruby(*args) command config('rubyprog'), *args end def make(task = nil) command(*[config('makeprog'), task].compact) end def extdir?(dir) File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb") end def files_of(dir) Dir.open(dir) {|d| return d.select {|ent| File.file?("#{dir}/#{ent}") } } end DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn ) def directories_of(dir) Dir.open(dir) {|d| return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT } end end # This module requires: #srcdir_root, #objdir_root, #relpath module HookScriptAPI def get_config(key) @config[key] end alias config get_config # obsolete: use metaconfig to change configuration def set_config(key, val) @config[key] = val end # # srcdir/objdir (works only in the package directory) # def curr_srcdir "#{srcdir_root()}/#{relpath()}" end def curr_objdir "#{objdir_root()}/#{relpath()}" end def srcfile(path) "#{curr_srcdir()}/#{path}" end def srcexist?(path) File.exist?(srcfile(path)) end def srcdirectory?(path) File.dir?(srcfile(path)) end def srcfile?(path) File.file?(srcfile(path)) end def srcentries(path = '.') Dir.open("#{curr_srcdir()}/#{path}") {|d| return d.to_a - %w(. ..) } end def srcfiles(path = '.') srcentries(path).select {|fname| File.file?(File.join(curr_srcdir(), path, fname)) } end def srcdirectories(path = '.') srcentries(path).select {|fname| File.dir?(File.join(curr_srcdir(), path, fname)) } end end class ToplevelInstaller Version = '3.4.1' Copyright = 'Copyright (c) 2000-2005 Minero Aoki' TASKS = [ [ 'all', 'do config, setup, then install' ], [ 'config', 'saves your configurations' ], [ 'show', 'shows current configuration' ], [ 'setup', 'compiles ruby extentions and others' ], [ 'install', 'installs files' ], [ 'test', 'run all tests in test/' ], [ 'clean', "does `make clean' for each extention" ], [ 'distclean',"does `make distclean' for each extention" ] ] def ToplevelInstaller.invoke config = ConfigTable.new(load_rbconfig()) config.load_standard_entries config.load_multipackage_entries if multipackage? config.fixup klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller) klass.new(File.dirname($0), config).invoke end def ToplevelInstaller.multipackage? File.dir?(File.dirname($0) + '/packages') end def ToplevelInstaller.load_rbconfig if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg } ARGV.delete(arg) load File.expand_path(arg.split(/=/, 2)[1]) $".push 'rbconfig.rb' else require 'rbconfig' end ::RbConfig::CONFIG end def initialize(ardir_root, config) @ardir = File.expand_path(ardir_root) @config = config # cache @valid_task_re = nil end def config(key) @config[key] end def inspect "#<#{self.class} #{__id__()}>" end def invoke run_metaconfigs case task = parsearg_global() when nil, 'all' parsearg_config init_installers exec_config exec_setup exec_install else case task when 'config', 'test' ; when 'clean', 'distclean' @config.load_savefile if File.exist?(@config.savefile) else @config.load_savefile end __send__ "parsearg_#{task}" init_installers __send__ "exec_#{task}" end end def run_metaconfigs @config.load_script "#{@ardir}/metaconfig" end def init_installers @installer = Installer.new(@config, @ardir, File.expand_path('.')) end # # Hook Script API bases # def srcdir_root @ardir end def objdir_root '.' end def relpath '.' end # # Option Parsing # def parsearg_global while arg = ARGV.shift case arg when /\A\w+\z/ setup_rb_error "invalid task: #{arg}" unless valid_task?(arg) return arg when '-q', '--quiet' @config.verbose = false when '--verbose' @config.verbose = true when '--help' print_usage $stdout exit 0 when '--version' puts "#{File.basename($0)} version #{Version}" exit 0 when '--copyright' puts Copyright exit 0 else setup_rb_error "unknown global option '#{arg}'" end end nil end def valid_task?(t) valid_task_re() =~ t end def valid_task_re @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/ end def parsearg_no_options unless ARGV.empty? task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1) setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}" end end alias parsearg_show parsearg_no_options alias parsearg_setup parsearg_no_options alias parsearg_test parsearg_no_options alias parsearg_clean parsearg_no_options alias parsearg_distclean parsearg_no_options def parsearg_config evalopt = [] set = [] @config.config_opt = [] while i = ARGV.shift if /\A--?\z/ =~ i @config.config_opt = ARGV.dup break end name, value = *@config.parse_opt(i) if @config.value_config?(name) @config[name] = value else evalopt.push [name, value] end set.push name end evalopt.each do |name, value| @config.lookup(name).evaluate value, @config end # Check if configuration is valid set.each do |n| @config[n] if @config.value_config?(n) end end def parsearg_install @config.no_harm = false @config.install_prefix = '' while a = ARGV.shift case a when '--no-harm' @config.no_harm = true when /\A--prefix=/ path = a.split(/=/, 2)[1] path = File.expand_path(path) unless path[0,1] == '/' @config.install_prefix = path else setup_rb_error "install: unknown option #{a}" end end end def print_usage(out) out.puts 'Typical Installation Procedure:' out.puts " $ ruby #{File.basename $0} config" out.puts " $ ruby #{File.basename $0} setup" out.puts " # ruby #{File.basename $0} install (may require root privilege)" out.puts out.puts 'Detailed Usage:' out.puts " ruby #{File.basename $0} " out.puts " ruby #{File.basename $0} [] []" fmt = " %-24s %s\n" out.puts out.puts 'Global options:' out.printf fmt, '-q,--quiet', 'suppress message outputs' out.printf fmt, ' --verbose', 'output messages verbosely' out.printf fmt, ' --help', 'print this message' out.printf fmt, ' --version', 'print version and quit' out.printf fmt, ' --copyright', 'print copyright and quit' out.puts out.puts 'Tasks:' TASKS.each do |name, desc| out.printf fmt, name, desc end fmt = " %-24s %s [%s]\n" out.puts out.puts 'Options for CONFIG or ALL:' @config.each do |item| out.printf fmt, item.help_opt, item.description, item.help_default end out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's" out.puts out.puts 'Options for INSTALL:' out.printf fmt, '--no-harm', 'only display what to do if given', 'off' out.printf fmt, '--prefix=path', 'install path prefix', '' out.puts end # # Task Handlers # def exec_config @installer.exec_config @config.save # must be final end def exec_setup @installer.exec_setup end def exec_install @installer.exec_install end def exec_test @installer.exec_test end def exec_show @config.each do |i| printf "%-20s %s\n", i.name, i.value if i.value? end end def exec_clean @installer.exec_clean end def exec_distclean @installer.exec_distclean end end # class ToplevelInstaller class ToplevelInstallerMulti < ToplevelInstaller include FileOperations def initialize(ardir_root, config) super @packages = directories_of("#{@ardir}/packages") raise 'no package exists' if @packages.empty? @root_installer = Installer.new(@config, @ardir, File.expand_path('.')) end def run_metaconfigs @config.load_script "#{@ardir}/metaconfig", self @packages.each do |name| @config.load_script "#{@ardir}/packages/#{name}/metaconfig" end end attr_reader :packages def packages=(list) raise 'package list is empty' if list.empty? list.each do |name| raise "directory packages/#{name} does not exist"\ unless File.dir?("#{@ardir}/packages/#{name}") end @packages = list end def init_installers @installers = {} @packages.each do |pack| @installers[pack] = Installer.new(@config, "#{@ardir}/packages/#{pack}", "packages/#{pack}") end with = extract_selection(config('with')) without = extract_selection(config('without')) @selected = @installers.keys.select {|name| (with.empty? or with.include?(name)) \ and not without.include?(name) } end def extract_selection(list) a = list.split(/,/) a.each do |name| setup_rb_error "no such package: #{name}" unless @installers.key?(name) end a end def print_usage(f) super f.puts 'Inluded packages:' f.puts ' ' + @packages.sort.join(' ') f.puts end # # Task Handlers # def exec_config run_hook 'pre-config' each_selected_installers {|inst| inst.exec_config } run_hook 'post-config' @config.save # must be final end def exec_setup run_hook 'pre-setup' each_selected_installers {|inst| inst.exec_setup } run_hook 'post-setup' end def exec_install run_hook 'pre-install' each_selected_installers {|inst| inst.exec_install } run_hook 'post-install' end def exec_test run_hook 'pre-test' each_selected_installers {|inst| inst.exec_test } run_hook 'post-test' end def exec_clean rm_f @config.savefile run_hook 'pre-clean' each_selected_installers {|inst| inst.exec_clean } run_hook 'post-clean' end def exec_distclean rm_f @config.savefile run_hook 'pre-distclean' each_selected_installers {|inst| inst.exec_distclean } run_hook 'post-distclean' end # # lib # def each_selected_installers Dir.mkdir 'packages' unless File.dir?('packages') @selected.each do |pack| $stderr.puts "Processing the package `#{pack}' ..." if verbose? Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}") Dir.chdir "packages/#{pack}" yield @installers[pack] Dir.chdir '../..' end end def run_hook(id) @root_installer.run_hook id end # module FileOperations requires this def verbose? @config.verbose? end # module FileOperations requires this def no_harm? @config.no_harm? end end # class ToplevelInstallerMulti class Installer FILETYPES = %w( bin lib ext data conf man ) include FileOperations include HookScriptAPI def initialize(config, srcroot, objroot) @config = config @srcdir = File.expand_path(srcroot) @objdir = File.expand_path(objroot) @currdir = '.' end def inspect "#<#{self.class} #{File.basename(@srcdir)}>" end def noop(rel) end # # Hook Script API base methods # def srcdir_root @srcdir end def objdir_root @objdir end def relpath @currdir end # # Config Access # # module FileOperations requires this def verbose? @config.verbose? end # module FileOperations requires this def no_harm? @config.no_harm? end def verbose_off begin save, @config.verbose = @config.verbose?, false yield ensure @config.verbose = save end end # # TASK config # def exec_config exec_task_traverse 'config' end alias config_dir_bin noop alias config_dir_lib noop def config_dir_ext(rel) extconf if extdir?(curr_srcdir()) end alias config_dir_data noop alias config_dir_conf noop alias config_dir_man noop def extconf ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt end # # TASK setup # def exec_setup exec_task_traverse 'setup' end def setup_dir_bin(rel) files_of(curr_srcdir()).each do |fname| update_shebang_line "#{curr_srcdir()}/#{fname}" end end alias setup_dir_lib noop def setup_dir_ext(rel) make if extdir?(curr_srcdir()) end alias setup_dir_data noop alias setup_dir_conf noop alias setup_dir_man noop def update_shebang_line(path) return if no_harm? return if config('shebang') == 'never' old = Shebang.load(path) if old $stderr.puts "warning: #{path}: Shebang line includes too many args. It is not portable and your program may not work." if old.args.size > 1 new = new_shebang(old) return if new.to_s == old.to_s else return unless config('shebang') == 'all' new = Shebang.new(config('rubypath')) end $stderr.puts "updating shebang: #{File.basename(path)}" if verbose? open_atomic_writer(path) {|output| File.open(path, 'rb') {|f| f.gets if old # discard output.puts new.to_s output.print f.read } } end def new_shebang(old) if /\Aruby/ =~ File.basename(old.cmd) Shebang.new(config('rubypath'), old.args) elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby' Shebang.new(config('rubypath'), old.args[1..-1]) else return old unless config('shebang') == 'all' Shebang.new(config('rubypath')) end end def open_atomic_writer(path, &block) tmpfile = File.basename(path) + '.tmp' begin File.open(tmpfile, 'wb', &block) File.rename tmpfile, File.basename(path) ensure File.unlink tmpfile if File.exist?(tmpfile) end end class Shebang def Shebang.load(path) line = nil File.open(path) {|f| line = f.gets } return nil unless /\A#!/ =~ line parse(line) end def Shebang.parse(line) cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ') new(cmd, args) end def initialize(cmd, args = []) @cmd = cmd @args = args end attr_reader :cmd attr_reader :args def to_s "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}") end end # # TASK install # def exec_install rm_f 'InstalledFiles' exec_task_traverse 'install' end def install_dir_bin(rel) install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755 end def install_dir_lib(rel) install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644 end def install_dir_ext(rel) return unless extdir?(curr_srcdir()) install_files rubyextentions('.'), "#{config('sodir')}/#{File.dirname(rel)}", 0555 end def install_dir_data(rel) install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644 end def install_dir_conf(rel) # FIXME: should not remove current config files # (rename previous file to .old/.org) install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644 end def install_dir_man(rel) install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644 end def install_files(list, dest, mode) mkdir_p dest, @config.install_prefix list.each do |fname| install fname, dest, mode, @config.install_prefix end end def libfiles glob_reject(%w(*.y *.output), targetfiles()) end def rubyextentions(dir) ents = glob_select("*.#{@config.dllext}", targetfiles()) if ents.empty? setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first" end ents end def targetfiles mapdir(existfiles() - hookfiles()) end def mapdir(ents) ents.map {|ent| if File.exist?(ent) then ent # objdir else "#{curr_srcdir()}/#{ent}" # srcdir end } end # picked up many entries from cvs-1.11.1/src/ignore.c JUNK_FILES = %w( core RCSLOG tags TAGS .make.state .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb *~ *.old *.bak *.BAK *.orig *.rej _$* *$ *.org *.in .* ) def existfiles glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.'))) end def hookfiles %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt| %w( config setup install clean ).map {|t| sprintf(fmt, t) } }.flatten end def glob_select(pat, ents) re = globs2re([pat]) ents.select {|ent| re =~ ent } end def glob_reject(pats, ents) re = globs2re(pats) ents.reject {|ent| re =~ ent } end GLOB2REGEX = { '.' => '\.', '$' => '\$', '#' => '\#', '*' => '.*' } def globs2re(pats) /\A(?:#{ pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|') })\z/ end # # TASK test # TESTDIR = 'test' def exec_test unless File.directory?('test') $stderr.puts 'no test in this package' if verbose? return end $stderr.puts 'Running tests...' if verbose? begin require 'test/unit' rescue LoadError setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.' end runner = Test::Unit::AutoRunner.new(true) runner.to_run << TESTDIR runner.run end # # TASK clean # def exec_clean exec_task_traverse 'clean' rm_f @config.savefile rm_f 'InstalledFiles' end alias clean_dir_bin noop alias clean_dir_lib noop alias clean_dir_data noop alias clean_dir_conf noop alias clean_dir_man noop def clean_dir_ext(rel) return unless extdir?(curr_srcdir()) make 'clean' if File.file?('Makefile') end # # TASK distclean # def exec_distclean exec_task_traverse 'distclean' rm_f @config.savefile rm_f 'InstalledFiles' end alias distclean_dir_bin noop alias distclean_dir_lib noop def distclean_dir_ext(rel) return unless extdir?(curr_srcdir()) make 'distclean' if File.file?('Makefile') end alias distclean_dir_data noop alias distclean_dir_conf noop alias distclean_dir_man noop # # Traversing # def exec_task_traverse(task) run_hook "pre-#{task}" FILETYPES.each do |type| if type == 'ext' and config('without-ext') == 'yes' $stderr.puts 'skipping ext/* by user option' if verbose? next end traverse task, type, "#{task}_dir_#{type}" end run_hook "post-#{task}" end def traverse(task, rel, mid) dive_into(rel) { run_hook "pre-#{task}" __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '') directories_of(curr_srcdir()).each do |d| traverse task, "#{rel}/#{d}", mid end run_hook "post-#{task}" } end def dive_into(rel) return unless File.dir?("#{@srcdir}/#{rel}") dir = File.basename(rel) Dir.mkdir dir unless File.dir?(dir) prevdir = Dir.pwd Dir.chdir dir $stderr.puts '---> ' + rel if verbose? @currdir = rel yield Dir.chdir prevdir $stderr.puts '<--- ' + rel if verbose? @currdir = File.dirname(rel) end def run_hook(id) path = [ "#{curr_srcdir()}/#{id}", "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) } return unless path begin instance_eval File.read(path), path, 1 rescue raise if $DEBUG setup_rb_error "hook #{path} failed:\n" + $!.message end end end # class Installer class SetupError < StandardError; end def setup_rb_error(msg) raise SetupError, msg end if $0 == __FILE__ begin ToplevelInstaller.invoke rescue SetupError raise if $DEBUG $stderr.puts $!.message $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." exit 1 end end kramdown-1.15.0/VERSION0000644000004100000410000000000713164166452014525 0ustar www-datawww-data1.15.0 kramdown-1.15.0/README.md0000644000004100000410000000541713164166452014746 0ustar www-datawww-data# kramdown ## Readme first! kramdown was originally licensed under the GPL until the 1.0.0 release. However, due to the many requests it is now released under the MIT license and therefore can easily be used in commercial projects, too. However, if you use kramdown in a commercial setting, please consider **contributing back any changes** for the benefit of the community and/or [**becoming a patron**](https://www.patreon.com/gettalong) - thanks! ## Introduction kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions. The syntax definition for the kramdown syntax can be found in **doc/syntax.page** (or online at ) and a quick reference is available in **doc/quickref.page** or online at . The kramdown library is mainly written to support the kramdown-to-HTML conversion chain. However, due to its flexibility (by creating an internal AST) it supports other input and output formats as well. Here is a list of the supported formats: * input formats: kramdown (a Markdown superset), Markdown, GFM, HTML * output formats: HTML, kramdown, LaTeX (and therefore PDF), PDF via Prawn All the documentation on the available input and output formats is available in the **doc/** directory and online at . Starting from version 1.0.0 kramdown is using a versioning scheme with major, minor and patch parts in the version number where the major number changes on backwards-incompatible changes, the minor number on the introduction of new features and the patch number on everything else. For information about changes between versions, have a look at or the commit history! ## Usage kramdown has a very simple API, so using kramdown is as easy as ```ruby require 'kramdown' Kramdown::Document.new(text).to_html ``` For detailed information have a look at the API documentation of the `Kramdown::Document` class. The full API documentation is available at , other sites with an API documentation for kramdown probably don't provide the complete documentation! There are also some third-party libraries that extend the functionality of kramdown -- see the kramdown Wiki at . ## Development Just clone the git repository as described in **doc/installation.page** and you are good to go. You probably want to install `rake` so that you can use the provided rake tasks. If you want to run the tests, the development dependencies are needed as well as some additional programs like `tidy` and `latex`. See the `.travis.yml` file for more information. ## License MIT - see the **COPYING** file. kramdown-1.15.0/COPYING0000644000004100000410000000243713164166452014521 0ustar www-datawww-datakramdown - fast, pure-Ruby Markdown-superset converter Copyright (C) 2009-2013 Thomas Leitner 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. Some test cases and the benchmark files are based on test cases from the MDTest test suite: MDTest Copyright (c) 2007 Michel Fortin