pax_global_header00006660000000000000000000000064125763126140014521gustar00rootroot0000000000000052 comment=00f2bb76963bb82ea8caa7e429527b809e3d5cda ruby-org-0.9.12/000077500000000000000000000000001257631261400133605ustar00rootroot00000000000000ruby-org-0.9.12/.gitignore000066400000000000000000000000471257631261400153510ustar00rootroot00000000000000*.tmproj /util/gen-special-replace.elc ruby-org-0.9.12/.travis.yml000066400000000000000000000001211257631261400154630ustar00rootroot00000000000000rvm: - 1.9.3 - 2.0.0 - 2.1.2 - 2.2.0-dev notifications: disabled: true ruby-org-0.9.12/Gemfile000066400000000000000000000003141257631261400146510ustar00rootroot00000000000000source "https://rubygems.org" gemspec group :development, :test do gem 'rake' gem 'rspec', '>= 3' gem 'tilt' end group :coderay do gem 'coderay' end group :pygments do gem 'pygments.rb' end ruby-org-0.9.12/History.org000066400000000000000000000155371257631261400155450ustar00rootroot00000000000000# -*- mode: org; mode: auto-fill; -*- #+title: Changelog #+startup: showeverything * 0.9.10 / 2014-12-09 - Add option to disable Rubypants * 0.9.9 / 2014-08-30 - Bugfix for comment regex * 0.9.8 / 2014-08-11 - Bugfix for =#+OPTIONS= values parsing * 0.9.7 / 2014-06-22 - Custom markup support for exporters via YAML files (by [[https://github.com/gnusosa][@gnusosa]]) - Bugfix: Recognize =#+RESULTS:= block from named blocks * 0.9.6 / 2014-05-06 - Support named results blocks * 0.9.5 / 2014-04-24 - Small bugfix to remove warning due to VERSION being repeated * 0.9.4 / 2014-04-18 - Track block names within the line properties - Add option to skip syntax highlighting explicitly * 0.9.3 / 2014-03-25 - Fix code blocks prepended comma stripping * 0.9.2 / 2014-03-22 - Fix Org mode syntax for escaping html: Syntax actually now is =@@html:@@= - Fix =#=TITLE:= to render as a h1 headline - Remove rewriting links to =.org= files as =.html= - Implement =:exports= options for code blocks * 0.9.1 / 2014-02-13 - Backport =CGI::escapeHTML= function from Ruby to have same output among different Ruby versions * 0.9.0 / 2014-02-08 - Add explicit enable or disable of include file feature - Add lang attribute to src code block to support syntax highlight in Github * 0.8.3 / 2014-02-02 - Bugfix :: Two backslashes =\\= at the end of the line make a line break without breaking paragraph. - Bugfix :: Fix inline formatting not working for definition lists - Add basic markdown exporter * 0.8.2 / 2013-11-09 - Manage the #=INCLUDE tag in org files (contribution by pierre-lecocq) - #=INCLUDE is disabled by default. Needs either =ORG_RUBY_INCLUDE_ROOT= or =ORG_RUBY_ENABLE_INCLUDE_FILES= environment variables in order to be enabled. - Link abbreviations with =#+LINK= tag are supported (by pierre-lecocq too, thanks!) - Strip prepended commas added by Emacs Org mode to src/example blocks * 0.8.1 / 2013-02-17 - Fix for html escaping when code is inline * 0.8.0 / 2013-02-10 - A lot of refactoring work and bugfixes contributed by vonavi (many thanks!) - Raw HTML is supported with =#+html= - Code indentation for code blocks is fixed now - Support for definition lists is improved - Bugfix for when including headlines in center and quote blocks. - Indentation of HTML output improved - Improvements to entities support for Textile and HTML outputs * 0.7.2 / 2012-10-07 - Many fixes to the regular expressions used for emphasis, contributed by [[http://github.com/vonavi][vonavi]] - Bug fix for when a table starts with a headline, thanks to [[http://github/til][til]] - Asterisk can be used for definition lists too - Use text lexer as default option for Pygments and Coderay when no language is specified * 0.7.1 / 2012-08-04 - Make source code blocks from lisp dialects use Pygments scheme lexer - Bugfix: Make Coderay fallback to text lexer when unsupported lang is set * 0.7.0 / 2012-07-08 - Highlight source code blocks using Pygments or CodeRay when available * 0.6.4 / 2012-07-08 - Fixed lists behavior when code fragments, tables and examples were present - Remove code tags with lang class and use instead src-:lang like org-exporter - Fixed property drawers to consider properties with hyphens like :noweb-ref: * 0.6.3 / 2012-05-22 - Minor enhancement: Correct handling of .org URIs in HTML markup routine (thanks, rayl) * 0.6.1 / 2012-04-14 - Added encoding directive to support Ruby 1.9.2 - Headlines with the =COMMENT= keyword, and the =PROPERTIES= drawer are not exported - Angle links in Org mode are embedded in anchor tags on html output - =#+=BEGIN/END_SRC= lang code blocks are embedded in code tags with class that specifies the coding language - Fixed bug in code blocks when a colon was at the beginning - More than five dashes create an horizontal rule in html output * 0.6.0 / 2011-09-03 - Added support for a "header offset" -- turns one star into an H2, etc. (thanks, niku) - The anchor text for a link can now be an image, and will get an img tag (thanks, punchagan) - Fixed bug in tables; only the first row is a header even if others have divider lines (thanks, leathekd) - Fixed bug in the list regular expression; lists require a space after the item delimiter (thanks, punchagan) - Lots from ruediger: * subscript / superscript * definition lists * centered text * symbol replacement * 0.5.3 / 2010-02-15 - Minor enhancement: Displays inline images * 0.5.2 / 2010-01-05 - Refactored to improve layering. * 0.5.1 / 2009-12-30 - Minor enhancement: Recognize lines starting with ":" as examples. - Minor enhancement: Recognize #=BEGIN_SRC as source blocks - Minor enhancement: Add "src" and "example" classes to
 blocks.

* 0.5.0 / 2009-12-30

 - Parse (but not necessarily *use*) in-buffer settings. The following
  in-buffer settings *are* used:
  * Understand the #=TITLE: directive.
  * Exporting todo keywords (option todo:t)
  * Numbering headlines (option num:t)
  * Skipping text before the first headline (option skip:t)
  * Skipping tables (option |:nil)
  * Custom todo keywords
  * EXPORT_SELECT_TAGS and EXPORT_EXLUDE_TAGS for controlling parts of
    the tree to export
 - Rewrite "file:(blah).org" links to "http:(blah).html" links. This
  makes the inter-links to other org-mode files work.
 - Uses  tags inside table rows that precede table separators.
 - Bugfixes:
  * Headings now have HTML escaped.

* 0.4.2 / 2009-12-29

 - Got rid of the extraneous newline at the start of code blocks.
 - Everything now shows up in code blocks, even org-mode metadata.
 - Fixed bugs:
  * Regressed smart double quotes with HTML escaping. Added a test
    case and fixed the regression.

* 0.4.1 / 2009-12-29

 - HTML is now escaped by default
 - org-mode comments will show up in a code block.

* 0.4.0 / 2009-12-28

 - The first thing output in HTML gets the class "title"
 - HTML output is now indented
 - Proper support for multi-paragraph list items.
 - Fixed bugs:
  * "rake spec" wouldn't work on Linux. Needed "require 'rubygems'".

* 0.3.0 / 2009-12-27

 - Uses rubypants to get better typography (smart quotes, elipses, etc.).
 - Fixed bugs:
  * Tables and lists did not get properly closed at the end of file
  * You couldn't do inline formatting inside table cells
  * Characters in PRE blocks were not HTML escaped.

* 0.2.0 / 2009-12-26

 - Renamed the gem to org-ruby
 - Added =to_html= for HTML output
 - Now supports the following inline markup: 
  * bold
  * italic
  * code
  * verbatim
  * underline
  * strikethrough
 - Continued code cleanup and refactoring

* 0.1.0 / 2009-12-23

 - Added support for block code
 - Added support for list items that wrap in the org source
 - Major code cleanup:
   Added =OutputBuffer= class that should make the code more maintainable.

* 0.0.2 / 2009-12-21

 - Initial version. Handles tables (but not headers), headlines,
  paragraphs, block quotes, strong & emphasis formatting.
ruby-org-0.9.12/README.org000066400000000000000000000130521257631261400150270ustar00rootroot00000000000000#+startup: showeverything

* OrgRuby

[[https://secure.travis-ci.org/wallyqs/org-ruby.png?branch=master]]

An [[http://orgmode.org][Org-mode]] parser written in Ruby.

/Originally by Brian Dewey/

** Installation

#+BEGIN_SRC ruby
gem install org-ruby
#+END_SRC

** Usage

From Ruby:

#+BEGIN_SRC ruby
  require 'org-ruby'

  # Renders HTML
  Orgmode::Parser.new("* Hello world!").to_html
  # => "

Hello world!

\n" # Renders Textile Orgmode::Parser.new("* Hello world!").to_textile # => "h1. Hello world!\n" # Renders Markdown Orgmode::Parser.new("* Hello world!").to_markdown # => "# Hello world!\n" # Renders HTML with custom markup Orgmode::Parser.new("* *Custom* /Markup/", { markup_file: "html.tags.yml" }).to_html # => "

Custom Markup

\n" # Renders Markdown with custom markup Orgmode::Parser.new("* *Custom* /Markup/", { markup_file: "md.tags.yml"}).to_markdown # => "# __Custom__ _Markup_\n" #+END_SRC The supported output exporters can be also called from the command line: #+BEGIN_SRC sh org-ruby --translate html sample.org org-ruby --translate textile sample.org org-ruby --translate markdown sample.org org-ruby --markup html.tags.yml sample.org org-ruby --markup md.tags.yml --translate markdown sample.org #+END_SRC ** Current status Not all of the [[http://orgmode.org/manual/][Org mode features]] are implemented yet. Currently, the development of the gem is mostly oriented towards giving support for exporting Org mode into other formats. Brief list of features supported: - Converts Org mode files to HTML, Textile or Markdown. - Supports tables, block quotes, code blocks, and html blocks - Supports bold, italic, underline, strikethrough, and code inline formatting. - Supports hyperlinks - Supports lists - Supports footnotes - Supports =.org= views in Rails through Tilt. - Code syntax highlight of code blocks using Pygments.rb or Coderay when available ** Custom Markup Org-ruby supports custom markups for HTML and Markdown. The custom markup needs to be in the form of a YAML file with the following keys and values: *** HTML Blocktags #+BEGIN_SRC yaml --- :HtmlBlockTag: :paragraph: p :ordered_list: ol :unordered_list: ul :list_item: li :definition_list: dl :definition_term: dt :definition_descr: dd :table: table :table_row: tr :quote: blockquote :example: pre :src: pre :inline_example: pre :center: div :heading1: h1 :heading2: h2 :heading3: h3 :heading4: h4 :heading5: h5 :heading6: h6 :title: h1 #+END_SRC For example, you only want to change the blockquote HTML tag to be translated, your YAML file would look like this: #+BEGIN_SRC yaml --- :HtmlBlockTag: :quote: pre #+END_SRC This will change the HTML markup to be translated in the blockquote element. *** HTML Emphasis: #+BEGIN_SRC yaml --- :Tags: "*": :open: b :close: b "/": :open: i :close: i "_": :open: span style=\"text-decoration:underline;\" :close: span "=": :open: code :close: code "~": :open: code :close: code "+": :open: del :close: del #+END_SRC Let's say that you prefer == over == in the Bold emphasis element of Org-mode, your YAML file should look like this: #+BEGIN_SRC yaml --- :Tags: "*": :open: strong :close: strong "/": :open: em :close: em #+END_SRC *** Markdown: #+BEGIN_SRC yaml --- :MarkdownMap: "*": "**" "/": "*" "_": "*" "=": "`" "~": "`" "+": "~~" #+END_SRC Let's say that you prefer underscores for Bold and Italics elements in Markdown, your YAML file should look like this: #+BEGIN_SRC yaml --- :MarkdownMap: "*": "__" "/": "_" #+END_SRC ** Contributing - If you see a feature missing, please create an issue so that the maintainer considers its implementation - Also, PRs are always welcome! Before submitting make sure to check what breaks by running =rake spec= ** Projects using it - Used at [[https://github.com/github/markup][github/markup]] for rendering =.org= files - The [[https://github.com/gollum/gollum][Gollum]] project uses it too - [[https://www.gitlab.com/][Gitlab]] includes it for rendering Org files with syntax highlighting - Can be used with Jekyll for building a site: [[https://github.com/wallyqs/yet-another-jekyll-org-template][example here]] ** License #+BEGIN_SRC (The MIT License) Copyright (c) 2009 Brian Dewey 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. #+END_SRC ruby-org-0.9.12/Rakefile000066400000000000000000000015101257631261400150220ustar00rootroot00000000000000require 'rspec/core' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList['spec/**/*_spec.rb'] spec.rspec_opts = ["--format", "documentation", "--colour"] end Dir['tasks/*'].each {|task| import task } task :test do exit_status = nil puts "Testing without CodeRay nor Pygments for code syntax highlight" system('bundle --without pygments:coderay > /dev/null 2>&1') exit_status = system('bundle exec rake spec') puts "Testing with CodeRay for code syntax highlight" system('bundle --without pygments > /dev/null 2>&1') exit_status = system('bundle exec rake spec') puts "Testing with Pygments for code syntax highlight" system('bundle --without coderay > /dev/null 2>&1') exit_status = system('bundle exec rake spec') exit exit_status end task :default => 'test' ruby-org-0.9.12/TODO000066400000000000000000000026571257631261400140620ustar00rootroot00000000000000# -*- mode: org; mode: auto-fill; -*- #+todo: TODO | DONE CANCELED #+startup: showeverything #+options: todo:t * Current version in use at Github Currently using: 0.9.1 Version would be bumped to: 0.9.9 ** Changelog for Github - Fix Org mode syntax for escaping html: Syntax actually now is =@@html:@@= - Fix '#=TITLE:' to render as a h1 headline https://github.com/github/markup/issues/309 - Remove rewriting links to '.org' files as '.html' https://github.com/github/markup/issues/100 - Implement :exports options for code blocks - Fix code blocks prepended comma stripping - Bugfix: Recognize =#+RESULTS: block from named blocks= * 0.11.X Purpose of this series of releases is latest features for support in other tools and catchup with Org mode 0.8.0 features. ** [0/4] 0.11.0 - [ ] Support =#+SETUPFILE= - [ ] Support =#+MACRO= - [ ] Use docopt - [ ] Adopt OrgSpec instead of Rake tasks for when adding a new feature * 0.10.X Purpose of these series of releases is stable support for Github adoption. ** [0/4] 0.10.0 - [ ] Read only task lists https://github.com/wallyqs/org-ruby/issues/15 - [ ] Table of contents support https://github.com/wallyqs/org-ruby/issues/17 - [ ] Improve the footnotes support https://github.com/wallyqs/org-ruby/issues/2 - [ ] Support cross references https://github.com/wallyqs/org-ruby/issues/11 * 0.9.X Patches and bugfixes before making it to 0.10 ruby-org-0.9.12/bin/000077500000000000000000000000001257631261400141305ustar00rootroot00000000000000ruby-org-0.9.12/bin/org-ruby000077500000000000000000000024451257631261400156310ustar00rootroot00000000000000#!/usr/bin/env ruby require 'org-ruby' require 'optparse' options = {} options_parser = OptionParser.new do |opts| options[:help] = false options[:format] = :html opts.banner = "Usage: org-ruby [options]" opts.on("-h", "--help", "Show this message") do |v| options[:help] = true end opts.on("-d", "--debug", "Run with $DEBUG true") do |v| options[:debug] = true end opts.on("-m", "--markup ", "Set Custom Markup file") do |f| options[:markup_file] = f end opts.on("-t", "--translate FORMAT", [:html, :textile, :markdown], "Translate the ORG file to the specified format.") do |v| options[:format] = v end opts.on("-v", "--version", "Print version") do |v| options[:version] = true end end begin options_parser.parse! if options[:version] puts OrgRuby::VERSION exit end if (ARGV.length == 0) then puts options_parser else data = IO.read(ARGV[0]) p = Orgmode::Parser.new(data, (options[:markup_file] ? {:markup_file => options[:markup_file]} : {})) $DEBUG = true if options[:debug] puts p.to_html if options[:format] == :html puts p.to_textile if options[:format] == :textile puts p.to_markdown if options[:format] == :markdown end rescue OptionParser::ParseError puts options_parser end ruby-org-0.9.12/lib/000077500000000000000000000000001257631261400141265ustar00rootroot00000000000000ruby-org-0.9.12/lib/org-ruby.rb000066400000000000000000000025661257631261400162320ustar00rootroot00000000000000$:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed # internal requires require 'org-ruby/version' require 'org-ruby/parser' require 'org-ruby/regexp_helper' require 'org-ruby/line' require 'org-ruby/headline' require 'org-ruby/output_buffer' # HTML exporter require 'org-ruby/html_output_buffer' require 'org-ruby/html_symbol_replace' # Textile exporter require 'org-ruby/textile_output_buffer' require 'org-ruby/textile_symbol_replace' # Markdown exporter require 'org-ruby/markdown_output_buffer' # Tilt support require 'org-ruby/tilt' module OrgRuby # :stopdoc: LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR # :startdoc: # Returns the version string for the library. # def self.version VERSION end # Utility method used to require all files ending in .rb that lie in the # directory below this file that has the same name as the filename passed # in. Optionally, a specific _directory_ name can be passed in such that # the _filename_ does not have to be equivalent to the directory. # def self.require_all_libs_relative_to( fname, dir = nil ) dir ||= ::File.basename(fname, '.*') search_me = ::File.expand_path( ::File.join(::File.dirname(fname), dir, '**', '*.rb')) Dir.glob(search_me).sort.each {|rb| require rb} end end ruby-org-0.9.12/lib/org-ruby/000077500000000000000000000000001257631261400156745ustar00rootroot00000000000000ruby-org-0.9.12/lib/org-ruby/headline.rb000066400000000000000000000062071257631261400177770ustar00rootroot00000000000000module Orgmode # Represents a headline in an orgmode file. class Headline < Line # This is the "level" of the headline attr_reader :level # This is the headline text -- the part of the headline minus the leading # asterisks, the keywords, and the tags. attr_reader :headline_text # This contains the lines that "belong" to the headline. attr_reader :body_lines # These are the headline tags attr_reader :tags # Optional keyword found at the beginning of the headline. attr_reader :keyword # Valid states for partial export. # exclude:: The entire subtree from this heading should be excluded. # headline_only:: The headline should be exported, but not the body. # all:: Everything should be exported, headline/body/children. ValidExportStates = [:exclude, :headline_only, :all] # The export state of this headline. See +ValidExportStates+. attr_accessor :export_state # Include the property drawer items found for the headline attr_accessor :property_drawer # This is the regex that matches a line LineRegexp = /^\*+\s+/ # This matches the tags on a headline TagsRegexp = /\s*:[\w:@]*:\s*$/ # Special keywords allowed at the start of a line. Keywords = %w[TODO DONE] KeywordsRegexp = Regexp.new("^(#{Keywords.join('|')})\$") # This matches a headline marked as COMMENT CommentHeadlineRegexp = /^COMMENT\s+/ def initialize(line, parser = nil, offset=0) super(line, parser) @body_lines = [] @tags = [] @export_state = :exclude @property_drawer = { } if (@line =~ LineRegexp) then @level = $&.strip.length + offset @headline_text = $'.strip if (@headline_text =~ TagsRegexp) then @tags = $&.split(/:/) # split tag text on semicolon @tags.delete_at(0) # the first item will be empty; discard @headline_text.gsub!(TagsRegexp, "") # Removes the tags from the headline end @keyword = nil parse_keywords else raise "'#{line}' is not a valid headline" end end # Override Line.output_text. For a heading, @headline_text # is what we should output. def output_text return @headline_text end # Determines if a line is an orgmode "headline": # A headline begins with one or more asterisks. def self.headline?(line) line =~ LineRegexp end # Determines if a headline has the COMMENT keyword. def comment_headline? @headline_text =~ CommentHeadlineRegexp end # Overrides Line.paragraph_type. def paragraph_type :"heading#{@level}" end ###################################################################### private def parse_keywords re = @parser.custom_keyword_regexp if @parser re ||= KeywordsRegexp words = @headline_text.split if words.length > 0 && words[0] =~ re then @keyword = words[0] @headline_text.sub!(Regexp.new("^#{@keyword}\s*"), "") end end end # class Headline end # class Orgmode ruby-org-0.9.12/lib/org-ruby/html_output_buffer.rb000066400000000000000000000323431257631261400221430ustar00rootroot00000000000000module Orgmode class HtmlOutputBuffer < OutputBuffer HtmlBlockTag = { :paragraph => "p", :ordered_list => "ol", :unordered_list => "ul", :list_item => "li", :definition_list => "dl", :definition_term => "dt", :definition_descr => "dd", :table => "table", :table_row => "tr", :quote => "blockquote", :example => "pre", :src => "pre", :inline_example => "pre", :center => "div", :heading1 => "h1", :heading2 => "h2", :heading3 => "h3", :heading4 => "h4", :heading5 => "h5", :heading6 => "h6", :title => "h1" } attr_reader :options def initialize(output, opts = {}) super(output) @buffer_tag = "HTML" @options = opts @new_paragraph = :start @footnotes = {} @unclosed_tags = [] @logger.debug "HTML export options: #{@options.inspect}" @custom_blocktags = {} if @options[:markup_file] unless @options[:skip_syntax_highlight] begin require 'pygments' rescue LoadError # Pygments is not supported so we try instead with CodeRay begin require 'coderay' rescue LoadError # No code syntax highlighting end end end if @options[:markup_file] do_custom_markup end end # Output buffer is entering a new mode. Use this opportunity to # write out one of the block tags in the HtmlBlockTag constant to # put this information in the HTML stream. def push_mode(mode, indent) super(mode, indent) if HtmlBlockTag[mode] unless ((mode_is_table?(mode) and skip_tables?) or (mode == :src and !@options[:skip_syntax_highlight] and defined? Pygments)) css_class = case when (mode == :src and @block_lang.empty?) " class=\"src\"" when (mode == :src and not @block_lang.empty?) " class=\"src\" lang=\"#{@block_lang}\"" when (mode == :example || mode == :inline_example) " class=\"example\"" when mode == :center " style=\"text-align: center\"" when @options[:decorate_title] " class=\"title\"" end add_paragraph unless @new_paragraph == :start @new_paragraph = true @logger.debug "#{mode}: <#{HtmlBlockTag[mode]}#{css_class}>" @output << "<#{HtmlBlockTag[mode]}#{css_class}>" # Entering a new mode obliterates the title decoration @options[:decorate_title] = nil end end end # We are leaving a mode. Close any tags that were opened when # entering this mode. def pop_mode(mode = nil) m = super(mode) if HtmlBlockTag[m] unless ((mode_is_table?(m) and skip_tables?) or (m == :src and !@options[:skip_syntax_highlight] and defined? Pygments)) add_paragraph if @new_paragraph @new_paragraph = true @logger.debug "" @output << "" end end @list_indent_stack.pop end def flush! return false if @buffer.empty? case when preserve_whitespace? strip_code_block! if mode_is_code? current_mode # NOTE: CodeRay and Pygments already escape the html once, so # no need to escapeHTML case when (current_mode == :src and @options[:skip_syntax_highlight]) @buffer = escapeHTML @buffer when (current_mode == :src and defined? Pygments) lang = normalize_lang @block_lang @output << "\n" unless @new_paragraph == :start @new_paragraph = true begin @buffer = Pygments.highlight(@buffer, :lexer => lang) rescue # Not supported lexer from Pygments, we fallback on using the text lexer @buffer = Pygments.highlight(@buffer, :lexer => 'text') end when (current_mode == :src and defined? CodeRay) lang = normalize_lang @block_lang # CodeRay might throw a warning when unsupported lang is set, # then fallback to using the text lexer silence_warnings do begin @buffer = CodeRay.scan(@buffer, lang).html(:wrap => nil, :css => :style) rescue ArgumentError @buffer = CodeRay.scan(@buffer, 'text').html(:wrap => nil, :css => :style) end end when (current_mode == :html or current_mode == :raw_text) @buffer.gsub!(/\A\n/, "") if @new_paragraph == :start @new_paragraph = true else # *NOTE* Don't use escape_string! through its sensitivity to @@html:@@ forms @buffer = escapeHTML @buffer end # Whitespace is significant in :code mode. Always output the # buffer and do not do any additional translation. @logger.debug "FLUSH CODE ==========> #{@buffer.inspect}" @output << @buffer when (mode_is_table? current_mode and skip_tables?) @logger.debug "SKIP ==========> #{current_mode}" else @buffer.lstrip! @new_paragraph = nil @logger.debug "FLUSH ==========> #{current_mode}" case current_mode when :definition_term d = @buffer.split(/\A(.*[ \t]+|)::(|[ \t]+.*?)$/, 4) d[1] = d[1].strip unless d[1].empty? @output << inline_formatting(d[1]) else @output << "???" end indent = @list_indent_stack.last pop_mode @new_paragraph = :start push_mode(:definition_descr, indent) @output << inline_formatting(d[2].strip + d[3]) @new_paragraph = nil when :horizontal_rule add_paragraph unless @new_paragraph == :start @new_paragraph = true @output << "
" else @output << inline_formatting(@buffer) end end @buffer = "" end def add_line_attributes headline if @options[:export_heading_number] then level = headline.level heading_number = get_next_headline_number(level) @output << "#{heading_number} " end if @options[:export_todo] and headline.keyword then keyword = headline.keyword @output << "#{keyword} " end end def output_footnotes! return false unless @options[:export_footnotes] and not @footnotes.empty? @output << "\n
\n

Footnotes:

\n
\n" @footnotes.each do |name, defi| @buffer = defi @output << "

#{name}" \ << inline_formatting(@buffer) \ << "

\n" end @output << "
\n
" return true end # Test if we're in an output mode in which whitespace is significant. def preserve_whitespace? super or current_mode == :html end ###################################################################### private def skip_tables? @options[:skip_tables] end def mode_is_table?(mode) (mode == :table or mode == :table_row or mode == :table_separator or mode == :table_header) end # Escapes any HTML content in string def escape_string! str str.gsub!(/&/, "&") # Escapes the left and right angular brackets but construction # @@html:@@ which is formatted to str.gsub! /<([^<>\n]*)/ do |match| ($`[-7..-1] == "@@html:" and $'[0..2] == ">@@") ? $& : "<#{$1}" end str.gsub! /([^<>\n]*)>/ do |match| $`[-8..-1] == "@@html:<" ? $& : "#{$1}>" end str.gsub! /@@html:(<[^<>\n]*>)@@/, "\\1" end def quote_tags str str.gsub /(<[^<>\n]*>)/, "@@html:\\1@@" end def buffer_indentation indent = " " * @list_indent_stack.length @buffer << indent end def add_paragraph indent = " " * (@list_indent_stack.length - 1) @output << "\n" << indent end Tags = { "*" => { :open => "b", :close => "b" }, "/" => { :open => "i", :close => "i" }, "_" => { :open => "span style=\"text-decoration:underline;\"", :close => "span" }, "=" => { :open => "code", :close => "code" }, "~" => { :open => "code", :close => "code" }, "+" => { :open => "del", :close => "del" } } # Applies inline formatting rules to a string. def inline_formatting(str) @re_help.rewrite_emphasis str do |marker, s| if marker == "=" or marker == "~" s = escapeHTML s "<#{Tags[marker][:open]}>#{s}" else quote_tags("<#{Tags[marker][:open]}>") + s + quote_tags("") end end if @options[:use_sub_superscripts] then @re_help.rewrite_subp str do |type, text| if type == "_" then quote_tags("") + text + quote_tags("") elsif type == "^" then quote_tags("") + text + quote_tags("") end end end @re_help.rewrite_links str do |link, defi| [link, defi].compact.each do |text| # We don't support search links right now. Get rid of it. text.sub!(/\A(file:[^\s]+)::[^\s]*?\Z/, "\\1") text.sub!(/\Afile:(?=[^\s]+\Z)/, "") end # We don't add a description for images in links, because its # empty value forces the image to be inlined. defi ||= link unless link =~ @re_help.org_image_file_regexp if defi =~ @re_help.org_image_file_regexp defi = quote_tags "\"#{defi}\"" end if defi link = @options[:link_abbrevs][link] if @options[:link_abbrevs].has_key? link quote_tags("") + defi + quote_tags("") else quote_tags "\"#{link}\"" end end if @output_type == :table_row str.gsub! /^\|\s*/, quote_tags("") str.gsub! /\s*\|$/, quote_tags("") str.gsub! /\s*\|\s*/, quote_tags("") end if @output_type == :table_header str.gsub! /^\|\s*/, quote_tags("") str.gsub! /\s*\|$/, quote_tags("") str.gsub! /\s*\|\s*/, quote_tags("") end if @options[:export_footnotes] then @re_help.rewrite_footnote str do |name, defi| # TODO escape name for url? @footnotes[name] = defi if defi quote_tags("") + name + quote_tags("") end end # Two backslashes \\ at the end of the line make a line break without breaking paragraph. if @output_type != :table_row and @output_type != :table_header then str.sub! /\\\\$/, quote_tags("
") end escape_string! str Orgmode.special_symbols_to_html str str = @re_help.restore_code_snippets str end def normalize_lang(lang) case lang when 'emacs-lisp', 'common-lisp', 'lisp' 'scheme' when '' 'text' else lang end end # Helper method taken from Rails # https://github.com/rails/rails/blob/c2c8ef57d6f00d1c22743dc43746f95704d67a95/activesupport/lib/active_support/core_ext/kernel/reporting.rb#L10 def silence_warnings warn_level = $VERBOSE $VERBOSE = nil yield ensure $VERBOSE = warn_level end def strip_code_block! if @code_block_indent and @code_block_indent > 0 strip_regexp = Regexp.new("^" + " " * @code_block_indent) @buffer.gsub!(strip_regexp, "") end @code_block_indent = nil # Strip proctective commas generated by Org mode (C-c ') @buffer.gsub! /^(\s*)(,)(\s*)([*]|#\+)/ do |match| "#{$1}#{$3}#{$4}" end end # The CGI::escapeHTML function backported from the Ruby standard library # as of commit fd2fc885b43283aa3d76820b2dfa9de19a77012f # # Implementation of the cgi module can change among Ruby versions # so stabilizing on a single one here to avoid surprises. # # https://github.com/ruby/ruby/blob/trunk/lib/cgi/util.rb # # The set of special characters and their escaped values TABLE_FOR_ESCAPE_HTML__ = { "'" => ''', '&' => '&', '"' => '"', '<' => '<', '>' => '>', } # Escape special characters in HTML, namely &\"<> # escapeHTML('Usage: foo "bar" ') # # => "Usage: foo "bar" <baz>" private def escapeHTML(string) string.gsub(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__) end end # class HtmlOutputBuffer end # module Orgmode ruby-org-0.9.12/lib/org-ruby/html_symbol_replace.rb000066400000000000000000000276451257631261400222630ustar00rootroot00000000000000# Autogenerated by util/gen-special-replace.el module Orgmode HtmlEntities = { "Agrave" => "À", "agrave" => "à", "Aacute" => "Á", "aacute" => "á", "Acirc" => "Â", "acirc" => "â", "Atilde" => "Ã", "atilde" => "ã", "Auml" => "Ä", "auml" => "ä", "Aring" => "Å", "AA" => "Å", "aring" => "å", "AElig" => "Æ", "aelig" => "æ", "Ccedil" => "Ç", "ccedil" => "ç", "Egrave" => "È", "egrave" => "è", "Eacute" => "É", "eacute" => "é", "Ecirc" => "Ê", "ecirc" => "ê", "Euml" => "Ë", "euml" => "ë", "Igrave" => "Ì", "igrave" => "ì", "Iacute" => "Í", "iacute" => "í", "Icirc" => "Î", "icirc" => "î", "Iuml" => "Ï", "iuml" => "ï", "Ntilde" => "Ñ", "ntilde" => "ñ", "Ograve" => "Ò", "ograve" => "ò", "Oacute" => "Ó", "oacute" => "ó", "Ocirc" => "Ô", "ocirc" => "ô", "Otilde" => "Õ", "otilde" => "õ", "Ouml" => "Ö", "ouml" => "ö", "Oslash" => "Ø", "oslash" => "ø", "OElig" => "Œ", "oelig" => "œ", "Scaron" => "Š", "scaron" => "š", "szlig" => "ß", "Ugrave" => "Ù", "ugrave" => "ù", "Uacute" => "Ú", "uacute" => "ú", "Ucirc" => "Û", "ucirc" => "û", "Uuml" => "Ü", "uuml" => "ü", "Yacute" => "Ý", "yacute" => "ý", "Yuml" => "Ÿ", "yuml" => "ÿ", "fnof" => "ƒ", "real" => "ℜ", "image" => "ℑ", "weierp" => "℘", "Alpha" => "Α", "alpha" => "α", "Beta" => "Β", "beta" => "β", "Gamma" => "Γ", "gamma" => "γ", "Delta" => "Δ", "delta" => "δ", "Epsilon" => "Ε", "epsilon" => "ε", "varepsilon" => "ε", "Zeta" => "Ζ", "zeta" => "ζ", "Eta" => "Η", "eta" => "η", "Theta" => "Θ", "theta" => "θ", "thetasym" => "ϑ", "vartheta" => "ϑ", "Iota" => "Ι", "iota" => "ι", "Kappa" => "Κ", "kappa" => "κ", "Lambda" => "Λ", "lambda" => "λ", "Mu" => "Μ", "mu" => "μ", "nu" => "ν", "Nu" => "Ν", "Xi" => "Ξ", "xi" => "ξ", "Omicron" => "Ο", "omicron" => "ο", "Pi" => "Π", "pi" => "π", "Rho" => "Ρ", "rho" => "ρ", "Sigma" => "Σ", "sigma" => "σ", "sigmaf" => "ς", "varsigma" => "ς", "Tau" => "Τ", "Upsilon" => "Υ", "upsih" => "ϒ", "upsilon" => "υ", "Phi" => "Φ", "phi" => "φ", "Chi" => "Χ", "chi" => "χ", "acutex" => "´x", "Psi" => "Ψ", "psi" => "ψ", "tau" => "τ", "Omega" => "Ω", "omega" => "ω", "piv" => "ϖ", "partial" => "∂", "alefsym" => "ℵ", "ETH" => "Ð", "eth" => "ð", "THORN" => "Þ", "thorn" => "þ", "dots" => "…", "hellip" => "…", "middot" => "·", "iexcl" => "¡", "iquest" => "¿", "shy" => "­", "ndash" => "–", "mdash" => "—", "quot" => """, "acute" => "´", "ldquo" => "“", "rdquo" => "”", "bdquo" => "„", "lsquo" => "‘", "rsquo" => "’", "sbquo" => "‚", "laquo" => "«", "raquo" => "»", "lsaquo" => "‹", "rsaquo" => "›", "circ" => "ˆ", "vert" => "|", "brvbar" => "¦", "sect" => "§", "amp" => "&", "lt" => "<", "gt" => ">", "tilde" => "˜", "slash" => "/", "plus" => "+", "under" => "_", "equal" => "=", "asciicirc" => "^", "dagger" => "†", "Dagger" => "‡", "nbsp" => " ", "ensp" => " ", "emsp" => " ", "thinsp" => " ", "curren" => "¤", "cent" => "¢", "pound" => "£", "yen" => "¥", "euro" => "€", "EUR" => "€", "EURdig" => "€", "EURhv" => "€", "EURcr" => "€", "EURtm" => "€", "copy" => "©", "reg" => "®", "trade" => "™", "minus" => "−", "pm" => "±", "plusmn" => "±", "times" => "×", "frasl" => "⁄", "div" => "÷", "frac12" => "½", "frac14" => "¼", "frac34" => "¾", "permil" => "‰", "sup1" => "¹", "sup2" => "²", "sup3" => "³", "radic" => "√", "sum" => "∑", "prod" => "∏", "micro" => "µ", "macr" => "¯", "prime" => "′", "Prime" => "″", "infin" => "∞", "infty" => "∞", "prop" => "∝", "proptp" => "∝", "not" => "¬", "neg" => "¬", "land" => "∧", "wedge" => "∧", "lor" => "∨", "vee" => "∨", "cap" => "∩", "cup" => "∪", "int" => "∫", "there4" => "∴", "sim" => "∼", "cong" => "≅", "simeq" => "≅", "asymp" => "≈", "approx" => "≈", "ne" => "≠", "neq" => "≠", "equiv" => "≡", "le" => "≤", "ge" => "≥", "sub" => "⊂", "subset" => "⊂", "sup" => "⊃", "supset" => "⊃", "nsub" => "⊄", "sube" => "⊆", "nsup" => "⊅", "supe" => "⊇", "forall" => "∀", "exist" => "∃", "exists" => "∃", "empty" => "∅", "emptyset" => "∅", "isin" => "∈", "in" => "∈", "notin" => "∉", "ni" => "∋", "nabla" => "∇", "ang" => "∠", "angle" => "∠", "perp" => "⊥", "sdot" => "⋅", "cdot" => "⋅", "lceil" => "⌈", "rceil" => "⌉", "lfloor" => "⌊", "rfloor" => "⌋", "lang" => "⟨", "rang" => "⟩", "larr" => "←", "leftarrow" => "←", "gets" => "←", "lArr" => "⇐", "Leftarrow" => "⇐", "uarr" => "↑", "uparrow" => "↑", "uArr" => "⇑", "Uparrow" => "⇑", "rarr" => "→", "to" => "→", "rightarrow" => "→", "rArr" => "⇒", "Rightarrow" => "⇒", "darr" => "↓", "downarrow" => "↓", "dArr" => "⇓", "Downarrow" => "⇓", "harr" => "↔", "leftrightarrow" => "↔", "hArr" => "⇔", "Leftrightarrow" => "⇔", "crarr" => "↵", "hookleftarrow" => "↵", "arccos" => "arccos", "arcsin" => "arcsin", "arctan" => "arctan", "arg" => "arg", "cos" => "cos", "cosh" => "cosh", "cot" => "cot", "coth" => "coth", "csc" => "csc", "deg" => "°", "det" => "det", "dim" => "dim", "exp" => "exp", "gcd" => "gcd", "hom" => "hom", "inf" => "inf", "ker" => "ker", "lg" => "lg", "lim" => "lim", "liminf" => "liminf", "limsup" => "limsup", "ln" => "ln", "log" => "log", "max" => "max", "min" => "min", "Pr" => "Pr", "sec" => "sec", "sin" => "sin", "sinh" => "sinh", "tan" => "tan", "tanh" => "tanh", "bull" => "•", "bullet" => "•", "star" => "*", "lowast" => "∗", "ast" => "∗", "odot" => "o", "oplus" => "⊕", "otimes" => "⊗", "checkmark" => "✓", "para" => "¶", "ordf" => "ª", "ordm" => "º", "cedil" => "¸", "oline" => "‾", "uml" => "¨", "zwnj" => "‌", "zwj" => "‍", "lrm" => "‎", "rlm" => "‏", "smile" => "☺", "smiley" => "☺", "blacksmile" => "☻", "sad" => "☹", "clubs" => "♣", "clubsuit" => "♣", "spades" => "♠", "spadesuit" => "♠", "hearts" => "♥", "heartsuit" => "♥", "diams" => "♦", "diamondsuit" => "♦", "Diamond" => "⋄", "loz" => "◊" } @org_entities_regexp = /\\(there4|sup[123]|frac[13][24]|[a-zA-Z]+)($|\{\}|[^a-zA-Z])/ def Orgmode.special_symbols_to_html str str.gsub! @org_entities_regexp do |match| if HtmlEntities[$1] if $2 == "{}" then "#{HtmlEntities[$1]}" else "#{HtmlEntities[$1]}#{$2}" end else $& end end end end # module Orgmode ruby-org-0.9.12/lib/org-ruby/line.rb000066400000000000000000000260761257631261400171630ustar00rootroot00000000000000module Orgmode # Represents a single line of an orgmode file. class Line # The indent level of this line. this is important to properly translate # nested lists from orgmode to textile. # TODO 2009-12-20 bdewey: Handle tabs attr_reader :indent # Backpointer to the parser that owns this line. attr_reader :parser # Paragraph type determined for the line. attr_reader :paragraph_type # Major modes associate paragraphs with a table, list and so on. attr_reader :major_mode # A line can have its type assigned instead of inferred from its # content. For example, something that parses as a "table" on its # own ("| one | two|\n") may just be a paragraph if it's inside # #+BEGIN_EXAMPLE. Set this property on the line to assign its # type. This will then affect the value of +paragraph_type+. attr_accessor :assigned_paragraph_type # In case more contextual info is needed we can put here attr_accessor :properties def initialize(line, parser=nil, assigned_paragraph_type=nil) @parser = parser @line = line @indent = 0 @line =~ /\s*/ @assigned_paragraph_type = assigned_paragraph_type @properties = { } determine_paragraph_type determine_major_mode @indent = $&.length unless blank? end def to_s return @line end # Tests if a line is a comment. def comment? return @assigned_paragraph_type == :comment if @assigned_paragraph_type return block_type.casecmp("COMMENT") if begin_block? or end_block? return @line =~ /^[ \t]*?#[ \t]/ end PropertyDrawerRegexp = /^\s*:(PROPERTIES|END):/i def property_drawer_begin_block? @line =~ PropertyDrawerRegexp && $1 =~ /PROPERTIES/ end def property_drawer_end_block? @line =~ PropertyDrawerRegexp && $1 =~ /END/ end def property_drawer? check_assignment_or_regexp(:property_drawer, PropertyDrawerRegexp) end PropertyDrawerItemRegexp = /^\s*:([0-9A-Za-z_\-]+):\s*(.*)$/i def property_drawer_item? @line =~ PropertyDrawerItemRegexp end def property_drawer_item @line =~ PropertyDrawerItemRegexp [$1, $2] end # Tests if a line contains metadata instead of actual content. def metadata? check_assignment_or_regexp(:metadata, /^\s*(CLOCK|DEADLINE|START|CLOSED|SCHEDULED):/) end def nonprinting? comment? || metadata? || begin_block? || end_block? || include_file? end def blank? check_assignment_or_regexp(:blank, /^\s*$/) end def plain_list? ordered_list? or unordered_list? or definition_list? end UnorderedListRegexp = /^\s*(-|\+|\s+[*])\s+/ def unordered_list? check_assignment_or_regexp(:unordered_list, UnorderedListRegexp) end def strip_unordered_list_tag @line.sub(UnorderedListRegexp, "") end DefinitionListRegexp = /^\s*(-|\+|\s+[*])\s+(.*\s+|)::($|\s+)/ def definition_list? check_assignment_or_regexp(:definition_list, DefinitionListRegexp) end OrderedListRegexp = /^\s*\d+(\.|\))\s+/ def ordered_list? check_assignment_or_regexp(:ordered_list, OrderedListRegexp) end def strip_ordered_list_tag @line.sub(OrderedListRegexp, "") end HorizontalRuleRegexp = /^\s*-{5,}\s*$/ def horizontal_rule? check_assignment_or_regexp(:horizontal_rule, HorizontalRuleRegexp) end # Extracts meaningful text and excludes org-mode markup, # like identifiers for lists or headings. def output_text return strip_ordered_list_tag if ordered_list? return strip_unordered_list_tag if unordered_list? return @line.sub(InlineExampleRegexp, "") if inline_example? return strip_raw_text_tag if raw_text? return @line end def plain_text? not metadata? and not blank? and not plain_list? end def table_row? # for an org-mode table, the first non-whitespace character is a # | (pipe). check_assignment_or_regexp(:table_row, /^\s*\|/) end def table_separator? # an org-mode table separator has the first non-whitespace # character as a | (pipe), then consists of nothing else other # than pipes, hyphens, and pluses. check_assignment_or_regexp(:table_separator, /^\s*\|[-\|\+]*\s*$/) end # Checks if this line is a table header. def table_header? @assigned_paragraph_type == :table_header end def table? table_row? or table_separator? or table_header? end # # 1) block delimiters # 2) block type (src, example, html...) # 3) switches (e.g. -n -r -l "asdf") # 4) header arguments (:hello world) # BlockRegexp = /^\s*#\+(BEGIN|END)_(\w*)\s*([0-9A-Za-z_\-]*)?\s*([^\":\n]*\"[^\"\n*]*\"[^\":\n]*|[^\":\n]*)?\s*([^\n]*)?/i def begin_block? @line =~ BlockRegexp && $1 =~ /BEGIN/i end def end_block? @line =~ BlockRegexp && $1 =~ /END/i end def block_type $2 if @line =~ BlockRegexp end def block_lang $3 if @line =~ BlockRegexp end def code_block? block_type =~ /^(EXAMPLE|SRC)$/i end def block_switches $4 if @line =~ BlockRegexp end def block_header_arguments header_arguments = { } if @line =~ BlockRegexp header_arguments_string = $5 harray = header_arguments_string.split(' ') harray.each_with_index do |arg, i| next_argument = harray[i + 1] if arg =~ /^:/ and not (next_argument.nil? or next_argument =~ /^:/) header_arguments[arg] = next_argument end end end header_arguments end # TODO: COMMENT block should be considered here def block_should_be_exported? export_state = block_header_arguments[':exports'] case when ['both', 'code', nil, ''].include?(export_state) true when ['none', 'results'].include?(export_state) false end end def results_block_should_be_exported? export_state = block_header_arguments[':exports'] case when ['results', 'both'].include?(export_state) true when ['code', 'none', nil, ''].include?(export_state) false end end InlineExampleRegexp = /^\s*:\s/ # Test if the line matches the "inline example" case: # the first character on the line is a colon. def inline_example? check_assignment_or_regexp(:inline_example, InlineExampleRegexp) end RawTextRegexp = /^(\s*)#\+(\w+):\s*/ # Checks if this line is raw text. def raw_text? check_assignment_or_regexp(:raw_text, RawTextRegexp) end def raw_text_tag $2.upcase if @line =~ RawTextRegexp end def strip_raw_text_tag @line.sub(RawTextRegexp) { |match| $1 } end InBufferSettingRegexp = /^#\+(\w+):\s*(.*)$/ # call-seq: # line.in_buffer_setting? => boolean # line.in_buffer_setting? { |key, value| ... } # # Called without a block, this method determines if the line # contains an in-buffer setting. Called with a block, the block # will get called if the line contains an in-buffer setting with # the key and value for the setting. def in_buffer_setting? return false if @assigned_paragraph_type && @assigned_paragraph_type != :comment if block_given? then if @line =~ InBufferSettingRegexp yield $1, $2 end else @line =~ InBufferSettingRegexp end end # #+TITLE: is special because even though that it can be # written many times in the document, its value will be that of the last one def title? @assigned_paragraph_type == :title end ResultsBlockStartsRegexp = /^\s*#\+RESULTS:\s*(.+)?$/i def start_of_results_code_block? @line =~ ResultsBlockStartsRegexp end LinkAbbrevRegexp = /^\s*#\+LINK:\s*(\w+)\s+(.+)$/i def link_abbrev? @line =~ LinkAbbrevRegexp end def link_abbrev_data [$1, $2] if @line =~ LinkAbbrevRegexp end IncludeFileRegexp = /^\s*#\+INCLUDE:\s*"([^"]+)"(\s+([^\s]+)\s+(.*))?$/i def include_file? @line =~ IncludeFileRegexp end def include_file_path File.expand_path $1 if @line =~ IncludeFileRegexp end def include_file_options [$3, $4] if @line =~ IncludeFileRegexp and !$2.nil? end # Determines the paragraph type of the current line. def determine_paragraph_type @paragraph_type = \ case when blank? :blank when definition_list? # order is important! A definition_list is also an unordered_list! :definition_term when (ordered_list? or unordered_list?) :list_item when property_drawer_begin_block? :property_drawer_begin_block when property_drawer_end_block? :property_drawer_end_block when property_drawer_item? :property_drawer_item when metadata? :metadata when block_type if block_should_be_exported? case block_type.downcase.to_sym when :center, :comment, :example, :html, :quote, :src block_type.downcase.to_sym else :comment end else :comment end when title? :title when raw_text? # order is important! Raw text can be also a comment :raw_text when comment? :comment when table_separator? :table_separator when table_row? :table_row when table_header? :table_header when inline_example? :inline_example when horizontal_rule? :horizontal_rule else :paragraph end end def determine_major_mode @major_mode = \ case when definition_list? # order is important! A definition_list is also an unordered_list! :definition_list when ordered_list? :ordered_list when unordered_list? :unordered_list when table? :table end end ###################################################################### private # This function is an internal helper for determining the paragraph # type of a line... for instance, if the line is a comment or contains # metadata. It's used in routines like blank?, plain_list?, etc. # # What's tricky is lines can have assigned types, so you need to check # the assigned type, if present, or see if the characteristic regexp # for the paragraph type matches if not present. # # call-seq: # check_assignment_or_regexp(assignment, regexp) => boolean # # assignment:: if the paragraph has an assigned type, it will be # checked to see if it equals +assignment+. # regexp:: If the paragraph does not have an assigned type, # the contents of the paragraph will be checked against # this regexp. def check_assignment_or_regexp(assignment, regexp) return @assigned_paragraph_type == assignment if @assigned_paragraph_type return @line =~ regexp end end # class Line end # module Orgmode ruby-org-0.9.12/lib/org-ruby/markdown_output_buffer.rb000066400000000000000000000055201257631261400230160ustar00rootroot00000000000000require 'stringio' module Orgmode class MarkdownOutputBuffer < OutputBuffer def initialize(output, opts = {}) super(output) @options = opts @logger.debug "Markdown export options: #{@options.inspect}" @custom_blocktags = {} if @options[:markup_file] if @options[:markup_file] do_custom_markup end end def push_mode(mode, indent) super(mode, indent) end def pop_mode(mode = nil) m = super(mode) @list_indent_stack.pop m end # Maps org markup to markdown markup. MarkdownMap = { "*" => "**", "/" => "*", "_" => "*", "=" => "`", "~" => "`", "+" => "~~" } # Handles inline formatting for markdown. def inline_formatting(input) @re_help.rewrite_emphasis input do |marker, body| m = MarkdownMap[marker] "#{m}#{body}#{m}" end @re_help.rewrite_subp input do |type, text| if type == "_" then "#{text}" elsif type == "^" then "#{text}" end end @re_help.rewrite_links input do |link, defi| # We don't add a description for images in links, because its # empty value forces the image to be inlined. defi ||= link unless link =~ @re_help.org_image_file_regexp link = link.gsub(/ /, "%%20") if defi =~ @re_help.org_image_file_regexp "![#{defi}](#{defi})" elsif defi "[#{defi}](#{link})" else "[#{link}](#{link})" end end # Just reuse Textile special symbols for now? Orgmode.special_symbols_to_textile(input) input = @re_help.restore_code_snippets input input end # TODO: Implement this def output_footnotes! return false end # Flushes the current buffer def flush! return false if @buffer.empty? and @output_type != :blank @logger.debug "FLUSH ==========> #{@output_type}" @buffer.gsub!(/\A\n*/, "") case when mode_is_code?(current_mode) @output << "```#{@block_lang}\n" @output << @buffer << "\n" @output << "```\n" when preserve_whitespace? @output << @buffer << "\n" when @output_type == :blank @output << "\n" else case current_mode when :paragraph @output << "> " if @mode_stack[0] == :quote when :list_item @output << " " * @mode_stack.count(:list_item) << "* " when :horizontal_rule @output << "---" end @output << inline_formatting(@buffer) << "\n" end @buffer = "" end def add_line_attributes headline @output << "#" * headline.level @output << " " end end # class MarkdownOutputBuffer end # module Orgmode ruby-org-0.9.12/lib/org-ruby/output_buffer.rb000066400000000000000000000237221257631261400211200ustar00rootroot00000000000000require 'logger' module Orgmode # The OutputBuffer is used to accumulate multiple lines of orgmode # text, and then emit them to the output all in one go. The class # will do the final textile substitution for inline formatting and # add a newline character prior emitting the output. class OutputBuffer # This is the overall output buffer attr_reader :output # This is the current type of output being accumulated. attr_accessor :output_type # Creates a new OutputBuffer object that is bound to an output object. # The output will get flushed to =output=. def initialize(output) # This is the accumulation buffer. It's a holding pen so # consecutive lines of the right type can get stuck together # without intervening newlines. @buffer = "" # This stack is used to do proper outline numbering of # headlines. @headline_number_stack = [] @output = output @output_type = :start @list_indent_stack = [] @mode_stack = [] @code_block_indent = nil @logger = Logger.new(STDERR) if ENV['DEBUG'] or $DEBUG @logger.level = Logger::DEBUG else @logger.level = Logger::WARN end @re_help = RegexpHelper.new end def current_mode @mode_stack.last end def push_mode(mode, indent) @mode_stack.push(mode) @list_indent_stack.push(indent) end def pop_mode(mode = nil) m = @mode_stack.pop @logger.warn "Modes don't match. Expected to pop #{mode}, but popped #{m}" if mode && mode != m m end def insert(line) # Prepares the output buffer to receive content from a line. # As a side effect, this may flush the current accumulated text. @logger.debug "Looking at #{line.paragraph_type}|#{line.assigned_paragraph_type}(#{current_mode}) : #{line.to_s}" # We try to get the lang from #+BEGIN_SRC blocks @block_lang = line.block_lang if line.begin_block? unless should_accumulate_output?(line) flush! maintain_mode_stack(line) end # Adds the current line to the output buffer case when line.assigned_paragraph_type == :comment # Don't add to buffer when line.title? @buffer << line.output_text when line.raw_text? @buffer << "\n" << line.output_text if line.raw_text_tag == @buffer_tag when preserve_whitespace? @buffer << "\n" << line.output_text unless line.block_type when line.assigned_paragraph_type == :code # If the line is contained within a code block but we should # not preserve whitespaces, then we do nothing. when (line.kind_of? Headline) add_line_attributes line @buffer << "\n" << line.output_text.strip when ([:definition_term, :list_item, :table_row, :table_header, :horizontal_rule].include? line.paragraph_type) @buffer << "\n" << line.output_text.strip when line.paragraph_type == :paragraph @buffer << "\n" buffer_indentation @buffer << line.output_text.strip end if mode_is_code? current_mode and not line.block_type # Determines the amount of whitespaces to be stripped at the # beginning of each line in code block. if line.paragraph_type != :blank if @code_block_indent @code_block_indent = [@code_block_indent, line.indent].min else @code_block_indent = line.indent end end end @output_type = line.assigned_paragraph_type || line.paragraph_type end # Gets the next headline number for a given level. The intent is # this function is called sequentially for each headline that # needs to get numbered. It does standard outline numbering. def get_next_headline_number(level) raise "Headline level not valid: #{level}" if level <= 0 while level > @headline_number_stack.length do @headline_number_stack.push 0 end while level < @headline_number_stack.length do @headline_number_stack.pop end raise "Oops, shouldn't happen" unless level == @headline_number_stack.length @headline_number_stack[@headline_number_stack.length - 1] += 1 @headline_number_stack.join(".") end # Gets the current list indent level. def list_indent_level @list_indent_stack.length end # Test if we're in an output mode in which whitespace is significant. def preserve_whitespace? [:example, :inline_example, :raw_text, :src].include? current_mode end def do_custom_markup if File.exists? @options[:markup_file] load_custom_markup if @custom_blocktags.empty? no_valid_markup_found else set_custom_markup end else no_custom_markup_file_exists end end def load_custom_markup require 'yaml' self.class.to_s == 'Orgmode::MarkdownOutputBuffer' ? filter = '^MarkdownMap$' : filter = '^HtmlBlockTag$|^Tags$' @custom_blocktags = YAML.load_file(@options[:markup_file]).select {|k| k.to_s.match(filter) } end def set_custom_markup @custom_blocktags.keys.each do |k| @custom_blocktags[k].each {|key,v| self.class.const_get(k.to_s)[key] = v if self.class.const_get(k.to_s).key? key} end end def no_valid_markup_found self.class.to_s == 'Orgmode::MarkdownOutputBuffer' ? tags = 'MarkdownMap' : tags = 'HtmlBlockTag or Tags' @logger.debug "Setting Custom Markup failed. No #{tags} key where found in: #{@options[:markup_file]}." @logger.debug "Continuing export with default markup." end def no_custom_markup_file_exists @logger.debug "Setting Custom Markup failed. No such file exists: #{@options[:markup_file]}." @logger.debug "Continuing export with default tags." end ###################################################################### private def mode_is_heading?(mode) [:heading1, :heading2, :heading3, :heading4, :heading5, :heading6].include? mode end def mode_is_block?(mode) [:quote, :center, :example, :src].include? mode end def mode_is_code?(mode) [:example, :src].include? mode end def boundary_of_block?(line) # Boundary of inline example return true if ((line.paragraph_type == :inline_example) ^ (@output_type == :inline_example)) # Boundary of begin...end block return true if mode_is_block? @output_type end def maintain_mode_stack(line) # Always close the following lines pop_mode if (mode_is_heading? current_mode or current_mode == :paragraph or current_mode == :horizontal_rule or current_mode == :inline_example or current_mode == :raw_text) # End-block line closes every mode within block if line.end_block? and @mode_stack.include? line.paragraph_type pop_mode until current_mode == line.paragraph_type end if ((not line.paragraph_type == :blank) or @output_type == :blank) # Close previous tags on demand. Two blank lines close all tags. while ((not @list_indent_stack.empty?) and @list_indent_stack.last >= line.indent and # Don't allow an arbitrary line to close block (not mode_is_block? current_mode)) # Item can't close its major mode if (@list_indent_stack.last == line.indent and line.major_mode == current_mode) break else pop_mode end end end # Special case: Only end-block line closes block pop_mode if line.end_block? and line.paragraph_type == current_mode unless line.paragraph_type == :blank or line.assigned_paragraph_type == :comment if (@list_indent_stack.empty? or @list_indent_stack.last <= line.indent or mode_is_block? current_mode) # Opens the major mode of line if it exists if @list_indent_stack.last != line.indent or mode_is_block? current_mode push_mode(line.major_mode, line.indent) if line.major_mode end # Opens tag that precedes text immediately push_mode(line.paragraph_type, line.indent) unless line.end_block? end end end def add_line_attributes headline # Implemented by specific output buffers end def output_footnotes! return false end # Tests if the current line should be accumulated in the current # output buffer. def should_accumulate_output? line # Special case: Assign mode if not yet done. return false unless current_mode # Special case: Handles accumulating block content and example lines if mode_is_code? current_mode return true unless (line.end_block? and line.paragraph_type == current_mode) end return false if boundary_of_block? line return true if current_mode == :inline_example # Special case: Don't accumulate the following lines. return false if (mode_is_heading? @output_type or @output_type == :comment or @output_type == :horizontal_rule or @output_type == :raw_text) # Special case: Blank line at least splits paragraphs return false if @output_type == :blank if line.paragraph_type == :paragraph # Paragraph gets accumulated only if its indent level is # greater than the indent level of the previous mode. if @mode_stack[-2] and not mode_is_block? @mode_stack[-2] return false if line.indent <= @list_indent_stack[-2] end # Special case: Multiple "paragraphs" get accumulated. return true end false end def buffer_indentation; false; end def flush!; false; end def output_footnotes!; false; end end # class OutputBuffer end # module Orgmode ruby-org-0.9.12/lib/org-ruby/parser.rb000066400000000000000000000374011257631261400175220ustar00rootroot00000000000000require 'rubypants' module Orgmode ## ## Simple routines for loading / saving an ORG file. ## class Parser # All of the lines of the orgmode file attr_reader :lines # All of the headlines in the org file attr_reader :headlines # These are any lines before the first headline attr_reader :header_lines # This contains any in-buffer settings from the org-mode file. # See http://orgmode.org/manual/In_002dbuffer-settings.html#In_002dbuffer-settings attr_reader :in_buffer_settings # This contains in-buffer options; a special case of in-buffer settings. attr_reader :options # Array of custom keywords. attr_reader :custom_keywords # Regexp that recognizes words in custom_keywords. def custom_keyword_regexp return nil if @custom_keywords.empty? Regexp.new("^(#{@custom_keywords.join('|')})\$") end # A set of tags that, if present on any headlines in the org-file, means # only those headings will get exported. def export_select_tags return Array.new unless @in_buffer_settings["EXPORT_SELECT_TAGS"] @in_buffer_settings["EXPORT_SELECT_TAGS"].split end # A set of tags that, if present on any headlines in the org-file, means # that subtree will not get exported. def export_exclude_tags return Array.new unless @in_buffer_settings["EXPORT_EXCLUDE_TAGS"] @in_buffer_settings["EXPORT_EXCLUDE_TAGS"].split end # Returns true if we are to export todo keywords on headings. def export_todo? "t" == @options["todo"] end # Returns true if we are to export footnotes def export_footnotes? "t" == @options["f"] end # Returns true if we are to export heading numbers. def export_heading_number? "t" == @options["num"] end # Should we skip exporting text before the first heading? def skip_header_lines? "t" == @options["skip"] end # Should we export tables? Defaults to true, must be overridden # with an explicit "nil" def export_tables? "nil" != @options["|"] end # Should we export sub/superscripts? (_{foo}/^{foo}) # only {} mode is currently supported. def use_sub_superscripts? @options["^"] != "nil" end # I can construct a parser object either with an array of lines # or with a single string that I will split along \n boundaries. def initialize(lines, parser_options={ }) if lines.is_a? Array then @lines = lines elsif lines.is_a? String then @lines = lines.split("\n") else raise "Unsupported type for +lines+: #{lines.class}" end @custom_keywords = [] @headlines = Array.new @current_headline = nil @header_lines = [] @in_buffer_settings = { } @options = { } @link_abbrevs = { } @parser_options = parser_options # # Include file feature disabled by default since # it would be dangerous in some environments # # http://orgmode.org/manual/Include-files.html # # It will be activated by one of the following: # # - setting an ORG_RUBY_ENABLE_INCLUDE_FILES env variable to 'true' # - setting an ORG_RUBY_INCLUDE_ROOT env variable with the root path # - explicitly enabling it by passing it as an option: # e.g. Orgmode::Parser.new(org_text, { :allow_include_files => true }) # # IMPORTANT: To avoid the feature altogether, it can be _explicitly disabled_ as follows: # e.g. Orgmode::Parser.new(org_text, { :allow_include_files => false }) # if @parser_options[:allow_include_files].nil? if ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] == 'true' \ or not ENV['ORG_RUBY_INCLUDE_ROOT'].nil? @parser_options[:allow_include_files] = true end end @parser_options[:offset] ||= 0 parse_lines @lines end # Check include file availability and permissions def check_include_file(file_path) can_be_included = File.exists? file_path if not ENV['ORG_RUBY_INCLUDE_ROOT'].nil? # Ensure we have full paths root_path = File.expand_path ENV['ORG_RUBY_INCLUDE_ROOT'] file_path = File.expand_path file_path # Check if file is in the defined root path and really exists if file_path.slice(0, root_path.length) != root_path can_be_included = false end end can_be_included end def parse_lines(lines) mode = :normal previous_line = nil table_header_set = false lines.each do |text| line = Line.new text, self if @parser_options[:allow_include_files] if line.include_file? and not line.include_file_path.nil? next if not check_include_file line.include_file_path include_data = get_include_data line include_lines = Orgmode::Parser.new(include_data, @parser_options).lines parse_lines include_lines end end # Store link abbreviations if line.link_abbrev? link_abbrev_data = line.link_abbrev_data @link_abbrevs[link_abbrev_data[0]] = link_abbrev_data[1] end mode = :normal if line.end_block? and [line.paragraph_type, :comment].include?(mode) mode = :normal if line.property_drawer_end_block? and mode == :property_drawer case mode when :normal, :quote, :center if Headline.headline? line.to_s line = Headline.new line.to_s, self, @parser_options[:offset] elsif line.table_separator? if previous_line and previous_line.paragraph_type == :table_row and !table_header_set previous_line.assigned_paragraph_type = :table_header table_header_set = true end end table_header_set = false if !line.table? when :example, :html, :src if previous_line set_name_for_code_block(previous_line, line) set_mode_for_results_block_contents(previous_line, line) end # As long as we stay in code mode, force lines to be code. # Don't try to interpret structural items, like headings and tables. line.assigned_paragraph_type = :code end if mode == :normal @headlines << @current_headline = line if Headline.headline? line.to_s # If there is a setting on this line, remember it. line.in_buffer_setting? do |key, value| store_in_buffer_setting key.upcase, value end mode = line.paragraph_type if line.begin_block? if previous_line set_name_for_code_block(previous_line, line) set_mode_for_results_block_contents(previous_line, line) mode = :property_drawer if previous_line.property_drawer_begin_block? end # We treat the results code block differently since the exporting can be omitted if line.begin_block? if line.results_block_should_be_exported? @next_results_block_should_be_exported = true else @next_results_block_should_be_exported = false end end end if mode == :property_drawer and @current_headline @current_headline.property_drawer[line.property_drawer_item.first] = line.property_drawer_item.last end unless mode == :comment if @current_headline @current_headline.body_lines << line else @header_lines << line end end previous_line = line end # lines.each end # initialize # Get include data, when #+INCLUDE tag is used # @link http://orgmode.org/manual/Include-files.html def get_include_data(line) return IO.read(line.include_file_path) if line.include_file_options.nil? case line.include_file_options[0] when ':lines' # Get options include_file_lines = line.include_file_options[1].gsub('"', '').split('-') include_file_lines[0] = include_file_lines[0].empty? ? 1 : include_file_lines[0].to_i include_file_lines[1] = include_file_lines[1].to_i if !include_file_lines[1].nil? # Extract request lines. Note that the second index is excluded, according to the doc line_index = 1 include_data = [] File.open(line.include_file_path, "r") do |fd| while line_data = fd.gets if (line_index >= include_file_lines[0] and (include_file_lines[1].nil? or line_index < include_file_lines[1])) include_data << line_data.chomp end line_index += 1 end end when 'src', 'example', 'quote' # Prepare tags begin_tag = '#+BEGIN_%s' % [line.include_file_options[0].upcase] if line.include_file_options[0] == 'src' and !line.include_file_options[1].nil? begin_tag += ' ' + line.include_file_options[1] end end_tag = '#+END_%s' % [line.include_file_options[0].upcase] # Get lines. Will be transformed into an array at processing include_data = "%s\n%s\n%s" % [begin_tag, IO.read(line.include_file_path), end_tag] else include_data = [] end # @todo: support ":minlevel" include_data end def set_name_for_code_block(previous_line, line) previous_line.in_buffer_setting? do |key, value| line.properties['block_name'] = value if key.downcase == 'name' end end def set_mode_for_results_block_contents(previous_line, line) if previous_line.start_of_results_code_block? \ or previous_line.assigned_paragraph_type == :comment unless @next_results_block_should_be_exported or line.paragraph_type == :blank line.assigned_paragraph_type = :comment end end end # Creates a new parser from the data in a given file def self.load(fname, opts = {}) lines = IO.readlines(fname) return self.new(lines, opts = {}) end # Saves the loaded orgmode file as a textile file. def to_textile output = "" output_buffer = TextileOutputBuffer.new(output) translate(@header_lines, output_buffer) @headlines.each do |headline| translate(headline.body_lines, output_buffer) end output end # Exports the Org mode content into Markdown format def to_markdown mark_trees_for_export export_options = { :markup_file => @parser_options[:markup_file] } output = "" output_buffer = MarkdownOutputBuffer.new(output, export_options) translate(@header_lines, output_buffer) @headlines.each do |headline| next if headline.export_state == :exclude case headline.export_state when :exclude # NOTHING when :headline_only translate(headline.body_lines[0, 1], output_buffer) when :all translate(headline.body_lines, output_buffer) end end output end # Converts the loaded org-mode file to HTML. def to_html mark_trees_for_export export_options = { :decorate_title => @in_buffer_settings["TITLE"], :export_heading_number => export_heading_number?, :export_todo => export_todo?, :use_sub_superscripts => use_sub_superscripts?, :export_footnotes => export_footnotes?, :link_abbrevs => @link_abbrevs, :skip_syntax_highlight => @parser_options[:skip_syntax_highlight], :markup_file => @parser_options[:markup_file] } export_options[:skip_tables] = true if not export_tables? output = "" output_buffer = HtmlOutputBuffer.new(output, export_options) if @in_buffer_settings["TITLE"] # If we're given a new title, then just create a new line # for that title. title = Line.new(@in_buffer_settings["TITLE"], self, :title) translate([title], output_buffer) end translate(@header_lines, output_buffer) unless skip_header_lines? # If we've output anything at all, remove the :decorate_title option. export_options.delete(:decorate_title) if (output.length > 0) @headlines.each do |headline| next if headline.export_state == :exclude case headline.export_state when :exclude # NOTHING when :headline_only translate(headline.body_lines[0, 1], output_buffer) when :all translate(headline.body_lines, output_buffer) end end output << "\n" return output if @parser_options[:skip_rubypants_pass] rp = RubyPants.new(output) rp.to_html end ###################################################################### private # Converts an array of lines to the appropriate format. # Writes the output to +output_buffer+. def translate(lines, output_buffer) output_buffer.output_type = :start lines.each { |line| output_buffer.insert(line) } output_buffer.flush! output_buffer.pop_mode while output_buffer.current_mode output_buffer.output_footnotes! output_buffer.output end # Uses export_select_tags and export_exclude_tags to determine # which parts of the org-file to export. def mark_trees_for_export marked_any = false # cache the tags select = export_select_tags exclude = export_exclude_tags inherit_export_level = nil ancestor_stack = [] # First pass: See if any headlines are explicitly selected @headlines.each do |headline| ancestor_stack.pop while not ancestor_stack.empty? and headline.level <= ancestor_stack.last.level if inherit_export_level and headline.level > inherit_export_level headline.export_state = :all else inherit_export_level = nil headline.tags.each do |tag| if (select.include? tag) then marked_any = true headline.export_state = :all ancestor_stack.each { |a| a.export_state = :headline_only unless a.export_state == :all } inherit_export_level = headline.level end end end ancestor_stack.push headline end # If nothing was selected, then EVERYTHING is selected. @headlines.each { |h| h.export_state = :all } unless marked_any # Second pass. Look for things that should be excluded, and get rid of them. @headlines.each do |headline| if inherit_export_level and headline.level > inherit_export_level headline.export_state = :exclude else inherit_export_level = nil headline.tags.each do |tag| if (exclude.include? tag) then headline.export_state = :exclude inherit_export_level = headline.level end end if headline.comment_headline? headline.export_state = :exclude inherit_export_level = headline.level end end end end # Stores an in-buffer setting. def store_in_buffer_setting(key, value) if key == "OPTIONS" # Options are stored in a hash. Special-case. value.scan(/([^ ]*):((((\(.*\))))|([^ ])*)/) do |o, v| @options[o] = v end elsif key =~ /^(TODO|SEQ_TODO|TYP_TODO)$/ # Handle todo keywords specially. value.split.each do |keyword| keyword.gsub!(/\(.*\)/, "") # Get rid of any parenthetical notes keyword = Regexp.escape(keyword) next if keyword == "\\|" # Special character in the todo format, not really a keyword @custom_keywords << keyword end else @in_buffer_settings[key] = value end end end # class Parser end # module Orgmode ruby-org-0.9.12/lib/org-ruby/regexp_helper.rb000066400000000000000000000153651257631261400210640ustar00rootroot00000000000000require 'logger' module Orgmode # = Summary # # This class contains helper routines to deal with the Regexp "black # magic" you need to properly parse org-mode files. # # = Key methods # # * Use +rewrite_emphasis+ to replace org-mode emphasis strings (e.g., # \/italic/) with the suitable markup for the output. # # * Use +rewrite_links+ to get a chance to rewrite all org-mode # links with suitable markup for the output. # # * Use +rewrite_images+ to rewrite all inline image links with suitable # markup for the output. class RegexpHelper ###################################################################### # EMPHASIS # # I figure it's best to stick as closely to the elisp implementation # as possible for emphasis. org.el defines the regular expression that # is used to apply "emphasis" (in my terminology, inline formatting # instead of block formatting). Here's the documentation from org.el. # # Terminology: In an emphasis string like " *strong word* ", we # call the initial space PREMATCH, the final space POSTMATCH, the # stars MARKERS, "s" and "d" are BORDER characters and "trong wor" # is the body. The different components in this variable specify # what is allowed/forbidden in each part: # # pre Chars allowed as prematch. Line beginning allowed, too. # post Chars allowed as postmatch. Line end will be allowed too. # border The chars *forbidden* as border characters. # body-regexp A regexp like \".\" to match a body character. Don't use # non-shy groups here, and don't allow newline here. # newline The maximum number of newlines allowed in an emphasis exp. attr_reader :org_image_file_regexp def initialize # Set up the emphasis regular expression. @pre_emphasis = ' \t\(\'"\{' @post_emphasis = '- \t\.,:!\?;\'"\)\}\\\\' @border_forbidden = '\s,"\'' @body_regexp = '.*?' @max_newlines = 1 @body_regexp = "#{@body_regexp}" + "(?:\\n#{@body_regexp}){0,#{@max_newlines}}" if @max_newlines > 0 @markers = '\*\/_=~\+' @code_snippet_stack = [] @logger = Logger.new(STDERR) @logger.level = Logger::WARN build_org_emphasis_regexp build_org_link_regexp @org_subp_regexp = /([_^])\{(.*?)\}/ @org_footnote_regexp = /\[fn:(.+?)(:(.*?))?\]/ end # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end # Compute replacements for all matching emphasized phrases. # Supply a block that will get the marker and body as parameters; # return the replacement string from your block. # # = Example # # re = RegexpHelper.new # result = re.rewrite_emphasis("*bold*, /italic/, =code=") do |marker, body| # "<#{map[marker]}>#{body}" # end # # In this example, the block body will get called three times: # # 1. Marker: "*", body: "bold" # 2. Marker: "/", body: "italic" # 3. Marker: "=", body: "code" # # The return from this block is a string that will be used to # replace "*bold*", "/italic/", and "=code=", # respectively. (Clearly this sample string will use HTML-like # syntax, assuming +map+ is defined appropriately.) def rewrite_emphasis str # escape the percent signs for safe restoring code snippets str.gsub!(/%/, "%%") format_str = "%s" str.gsub! @org_emphasis_regexp do |match| pre = $1 # preserve the code snippet from further formatting if $2 == "=" or $2 == "~" inner = yield $2, $3 # code is not formatted, so turn to single percent signs inner.gsub!(/%%/, "%") @code_snippet_stack.push inner "#{pre}#{format_str}" else inner = yield $2, $3 "#{pre}#{inner}" end end end # rewrite subscript and superscript (_{foo} and ^{bar}) def rewrite_subp str # :yields: type ("_" for subscript and "^" for superscript), text str.gsub! @org_subp_regexp do |match| yield $1, $2 end end # rewrite footnotes def rewrite_footnote str # :yields: name, definition or nil str.gsub! @org_footnote_regexp do |match| yield $1, $3 end end # = Summary # # Rewrite org-mode links in a string to markup suitable to the # output format. # # = Usage # # Give this a block that expect the link and optional friendly # text. Return how that link should get formatted. # # = Example # # re = RegexpHelper.new # result = re.rewrite_links("[[http://www.bing.com]] and [[http://www.hotmail.com][Hotmail]]") do |link, text} # text ||= link # "#{text}" # end # # In this example, the block body will get called two times. In the # first instance, +text+ will be nil (the org-mode markup gives no # friendly text for the link +http://www.bing.com+. In the second # instance, the block will get text of *Hotmail* and the link # +http://www.hotmail.com+. In both cases, the block returns an # HTML-style link, and that is how things will get recorded in # +result+. def rewrite_links str # :yields: link, text str.gsub! @org_link_regexp do |match| yield $1, $3 end str.gsub! @org_angle_link_text_regexp do |match| yield $1, nil end str # for testing end def restore_code_snippets str str = str % @code_snippet_stack @code_snippet_stack = [] str end private def build_org_emphasis_regexp @org_emphasis_regexp = Regexp.new("([#{@pre_emphasis}]|^)" + "([#{@markers}])(?!\\2)" + "([^#{@border_forbidden}]|" + "[^#{@border_forbidden}]#{@body_regexp}" + "[^#{@border_forbidden}])\\2" + "(?=[#{@post_emphasis}]|$)") @logger.debug "Just created regexp: #{@org_emphasis_regexp}" end def build_org_link_regexp @org_link_regexp = /\[\[ ([^\]\[]+) # This is the URL \](\[ ([^\]\[]+) # This is the friendly text \])?\]/x @org_angle_link_text_regexp = /<(\w+:[^\]\s<>]+)>/ @org_image_file_regexp = /\.(gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svg|tiff?|x[bp]m)/i end end # class Emphasis end # module Orgmode ruby-org-0.9.12/lib/org-ruby/textile_output_buffer.rb000066400000000000000000000105231257631261400226510ustar00rootroot00000000000000require 'stringio' module Orgmode class TextileOutputBuffer < OutputBuffer def initialize(output) super(output) @add_paragraph = true @support_definition_list = true # TODO this should be an option @footnotes = [] end def push_mode(mode, indent) super(mode, indent) @output << "bc. " if mode_is_code? mode if mode == :center or mode == :quote @add_paragraph = false @output << "\n" end end def pop_mode(mode = nil) m = super(mode) @list_indent_stack.pop if m == :center or m == :quote @add_paragraph = true @output << "\n" end m end # Maps org markup to textile markup. TextileMap = { "*" => "*", "/" => "_", "_" => "_", "=" => "@", "~" => "@", "+" => "+" } # Handles inline formatting for textile. def inline_formatting(input) @re_help.rewrite_emphasis input do |marker, body| m = TextileMap[marker] "#{m}#{body}#{m}" end @re_help.rewrite_subp input do |type, text| if type == "_" then "~#{text}~" elsif type == "^" then "^#{text}^" end end @re_help.rewrite_links input do |link, defi| [link, defi].compact.each do |text| # We don't support search links right now. Get rid of it. text.sub!(/\A(file:[^\s]+)::[^\s]*?\Z/, "\\1") text.sub!(/\A(file:[^\s]+)\.org\Z/i, "\\1.textile") text.sub!(/\Afile:(?=[^\s]+\Z)/, "") end # We don't add a description for images in links, because its # empty value forces the image to be inlined. defi ||= link unless link =~ @re_help.org_image_file_regexp link = link.gsub(/ /, "%%20") if defi =~ @re_help.org_image_file_regexp defi = "!#{defi}(#{defi})!" elsif defi defi = "\"#{defi}\"" end if defi "#{defi}:#{link}" else "!#{link}(#{link})!" end end @re_help.rewrite_footnote input do |name, definition| # textile only support numerical names, so we need to do some conversion # Try to find the footnote and use its index footnote = @footnotes.select {|f| f[:name] == name }.first if footnote # The latest definition overrides other ones footnote[:definition] = definition if definition and not footnote[:definition] else # There is no footnote with the current name so we add it footnote = { :name => name, :definition => definition } @footnotes << footnote end "[#{@footnotes.index(footnote)}]" end Orgmode.special_symbols_to_textile(input) input = @re_help.restore_code_snippets input input end def output_footnotes! return false if @footnotes.empty? @footnotes.each do |footnote| index = @footnotes.index(footnote) @output << "\nfn#{index}. #{footnote[:definition] || 'DEFINITION NOT FOUND' }\n" end return true end # Flushes the current buffer def flush! return false if @buffer.empty? and @output_type != :blank @logger.debug "FLUSH ==========> #{@output_type}" @buffer.gsub!(/\A\n*/, "") case when preserve_whitespace? @output << @buffer << "\n" when @output_type == :blank @output << "\n" else case current_mode when :paragraph @output << "p. " if @add_paragraph @output << "p=. " if @mode_stack[0] == :center @output << "bq. " if @mode_stack[0] == :quote when :list_item if @mode_stack[-2] == :ordered_list @output << "#" * @mode_stack.count(:list_item) << " " else # corresponds to unordered list @output << "*" * @mode_stack.count(:list_item) << " " end when :definition_term if @support_definition_list @output << "-" * @mode_stack.count(:definition_term) << " " @buffer.sub!("::", ":=") end end @output << inline_formatting(@buffer) << "\n" end @buffer = "" end def add_line_attributes headline @output << "h#{headline.level}. " end end # class TextileOutputBuffer end # module Orgmode ruby-org-0.9.12/lib/org-ruby/textile_symbol_replace.rb000066400000000000000000000253171257631261400227670ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Autogenerated by util/gen-special-replace.el module Orgmode TextileEntities = { "Agrave" => "À", "agrave" => "à", "Aacute" => "Ã", "aacute" => "á", "Acirc" => "Â", "acirc" => "â", "Atilde" => "Ã", "atilde" => "ã", "Auml" => "Ä", "auml" => "ä", "Aring" => "Ã…", "AA" => "Ã…", "aring" => "Ã¥", "AElig" => "Æ", "aelig" => "æ", "Ccedil" => "Ç", "ccedil" => "ç", "Egrave" => "È", "egrave" => "è", "Eacute" => "É", "eacute" => "é", "Ecirc" => "Ê", "ecirc" => "ê", "Euml" => "Ë", "euml" => "ë", "Igrave" => "ÃŒ", "igrave" => "ì", "Iacute" => "Ã", "iacute" => "í", "Icirc" => "ÃŽ", "icirc" => "î", "Iuml" => "Ã", "iuml" => "ï", "Ntilde" => "Ñ", "ntilde" => "ñ", "Ograve" => "Ã’", "ograve" => "ò", "Oacute" => "Ó", "oacute" => "ó", "Ocirc" => "Ô", "ocirc" => "ô", "Otilde" => "Õ", "otilde" => "õ", "Ouml" => "Ö", "ouml" => "ö", "Oslash" => "Ø", "oslash" => "ø", "OElig" => "Å’", "oelig" => "Å“", "Scaron" => "Å ", "scaron" => "Å¡", "szlig" => "ß", "Ugrave" => "Ù", "ugrave" => "ù", "Uacute" => "Ú", "uacute" => "ú", "Ucirc" => "Û", "ucirc" => "û", "Uuml" => "Ü", "uuml" => "ü", "Yacute" => "Ã", "yacute" => "ý", "Yuml" => "Ÿ", "yuml" => "ÿ", "fnof" => "Æ’", "real" => "ℜ", "image" => "â„‘", "weierp" => "℘", "Alpha" => "Α", "alpha" => "α", "Beta" => "Î’", "beta" => "β", "Gamma" => "Γ", "gamma" => "γ", "Delta" => "Δ", "delta" => "δ", "Epsilon" => "Ε", "epsilon" => "ε", "varepsilon" => "ε", "Zeta" => "Ζ", "zeta" => "ζ", "Eta" => "Η", "eta" => "η", "Theta" => "Θ", "theta" => "θ", "thetasym" => "Ï‘", "vartheta" => "Ï‘", "Iota" => "Ι", "iota" => "ι", "Kappa" => "Κ", "kappa" => "κ", "Lambda" => "Λ", "lambda" => "λ", "Mu" => "Μ", "mu" => "μ", "nu" => "ν", "Nu" => "Î", "Xi" => "Ξ", "xi" => "ξ", "Omicron" => "Ο", "omicron" => "ο", "Pi" => "Π", "pi" => "Ï€", "Rho" => "Ρ", "rho" => "Ï", "Sigma" => "Σ", "sigma" => "σ", "sigmaf" => "Ï‚", "varsigma" => "Ï‚", "Tau" => "Τ", "Upsilon" => "Î¥", "upsih" => "Ï’", "upsilon" => "Ï…", "Phi" => "Φ", "phi" => "φ", "Chi" => "Χ", "chi" => "χ", "acutex" => "ð‘¥Ì", "Psi" => "Ψ", "psi" => "ψ", "tau" => "Ï„", "Omega" => "Ω", "omega" => "ω", "piv" => "Ï–", "partial" => "∂", "alefsym" => "ℵ", "ETH" => "Ã", "eth" => "ð", "THORN" => "Þ", "thorn" => "þ", "dots" => "…", "hellip" => "…", "middot" => "·", "iexcl" => "¡", "iquest" => "¿", "shy" => "", "ndash" => "–", "mdash" => "—", "quot" => "\"", "acute" => "´", "ldquo" => "“", "rdquo" => "â€", "bdquo" => "„", "lsquo" => "‘", "rsquo" => "’", "sbquo" => "‚", "laquo" => "«", "raquo" => "»", "lsaquo" => "‹", "rsaquo" => "›", "circ" => "ˆ", "vert" => "|", "brvbar" => "¦", "sect" => "§", "amp" => "&", "lt" => "<", "gt" => ">", "tilde" => "~", "slash" => "/", "plus" => "+", "under" => "_", "equal" => "=", "asciicirc" => "^", "dagger" => "†", "Dagger" => "‡", "nbsp" => " ", "ensp" => " ", "emsp" => " ", "thinsp" => " ", "curren" => "¤", "cent" => "¢", "pound" => "£", "yen" => "Â¥", "euro" => "€", "EUR" => "€", "EURdig" => "€", "EURhv" => "€", "EURcr" => "€", "EURtm" => "€", "copy" => "©", "reg" => "®", "trade" => "â„¢", "minus" => "−", "pm" => "±", "plusmn" => "±", "times" => "×", "frasl" => "â„", "div" => "÷", "frac12" => "½", "frac14" => "¼", "frac34" => "¾", "permil" => "‰", "sup1" => "¹", "sup2" => "²", "sup3" => "³", "radic" => "√", "sum" => "∑", "prod" => "âˆ", "micro" => "µ", "macr" => "¯", "deg" => "°", "prime" => "′", "Prime" => "″", "infin" => "∞", "infty" => "∞", "prop" => "âˆ", "proptp" => "âˆ", "not" => "¬", "neg" => "¬", "land" => "∧", "wedge" => "∧", "lor" => "∨", "vee" => "∨", "cap" => "∩", "cup" => "∪", "int" => "∫", "there4" => "∴", "sim" => "∼", "cong" => "≅", "simeq" => "≅", "asymp" => "≈", "approx" => "≈", "ne" => "≠", "neq" => "≠", "equiv" => "≡", "le" => "≤", "ge" => "≥", "sub" => "⊂", "subset" => "⊂", "sup" => "⊃", "supset" => "⊃", "nsub" => "⊄", "sube" => "⊆", "nsup" => "⊅", "supe" => "⊇", "forall" => "∀", "exist" => "∃", "exists" => "∃", "empty" => "∅", "emptyset" => "∅", "isin" => "∈", "in" => "∈", "notin" => "∉", "ni" => "∋", "nabla" => "∇", "ang" => "∠", "angle" => "∠", "perp" => "⊥", "sdot" => "â‹…", "cdot" => "â‹…", "lceil" => "⌈", "rceil" => "⌉", "lfloor" => "⌊", "rfloor" => "⌋", "lang" => "⟨", "rang" => "⟩", "larr" => "â†", "leftarrow" => "â†", "gets" => "â†", "lArr" => "â‡", "Leftarrow" => "â‡", "uarr" => "↑", "uparrow" => "↑", "uArr" => "⇑", "Uparrow" => "⇑", "rarr" => "→", "to" => "→", "rightarrow" => "→", "rArr" => "⇒", "Rightarrow" => "⇒", "darr" => "↓", "downarrow" => "↓", "dArr" => "⇓", "Downarrow" => "⇓", "harr" => "↔", "leftrightarrow" => "↔", "hArr" => "⇔", "Leftrightarrow" => "⇔", "crarr" => "↵", "hookleftarrow" => "↵", "arccos" => "arccos", "arcsin" => "arcsin", "arctan" => "arctan", "arg" => "arg", "cos" => "cos", "cosh" => "cosh", "cot" => "cot", "coth" => "coth", "csc" => "csc", "det" => "det", "dim" => "dim", "exp" => "exp", "gcd" => "gcd", "hom" => "hom", "inf" => "inf", "ker" => "ker", "lg" => "lg", "lim" => "lim", "liminf" => "liminf", "limsup" => "limsup", "ln" => "ln", "log" => "log", "max" => "max", "min" => "min", "Pr" => "Pr", "sec" => "sec", "sin" => "sin", "sinh" => "sinh", "tan" => "tan", "tanh" => "tanh", "bull" => "•", "bullet" => "•", "star" => "⋆", "lowast" => "∗", "ast" => "*", "odot" => "ʘ", "oplus" => "⊕", "otimes" => "⊗", "checkmark" => "✓", "para" => "¶", "ordf" => "ª", "ordm" => "º", "cedil" => "¸", "oline" => "‾", "uml" => "¨", "zwnj" => "‌", "zwj" => "â€", "lrm" => "‎", "rlm" => "â€", "smile" => "⌣", "smiley" => "☺", "blacksmile" => "☻", "sad" => "☹", "clubs" => "♣", "clubsuit" => "♣", "spades" => "â™ ", "spadesuit" => "â™ ", "hearts" => "♥", "heartsuit" => "♥", "diams" => "♦", "diamondsuit" => "♦", "Diamond" => "â‹„", "loz" => "â—Š" } @org_entities_regexp = /\\(there4|sup[123]|frac[13][24]|[a-zA-Z]+)($|\{\}|[^a-zA-Z])/ def Orgmode.special_symbols_to_textile str str.gsub! @org_entities_regexp do |match| if TextileEntities[$1] if $2 == "{}" then "#{TextileEntities[$1]}" else "#{TextileEntities[$1]}#{$2}" end else $& end end end end # module Orgmode ruby-org-0.9.12/lib/org-ruby/tilt.rb000066400000000000000000000007621257631261400172020ustar00rootroot00000000000000begin require 'tilt' module Tilt class OrgTemplate < Template def self.engine_initialized? defined? ::Orgmode end def initialize_engine require 'org-ruby' end def prepare @engine = Orgmode::Parser.new(data) @output = nil end def evaluate(scope, locals, &block) @output ||= @engine.to_html end end end Tilt.register Tilt::OrgTemplate, 'org' rescue LoadError # Tilt is not available. end ruby-org-0.9.12/lib/org-ruby/version.rb000066400000000000000000000000501257631261400177010ustar00rootroot00000000000000module OrgRuby VERSION = '0.9.12' end ruby-org-0.9.12/org-ruby.gemspec000066400000000000000000000033041257631261400164730ustar00rootroot00000000000000# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "org-ruby/version" Gem::Specification.new do |s| s.name = "org-ruby" s.version = OrgRuby::VERSION s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Brian Dewey", "Waldemar Quevedo"] s.date = Time.now.strftime("%Y-%m-%d") s.description = "An Org mode parser written in Ruby." s.email = "waldemar.quevedo@gmail.com" s.executables = ["org-ruby"] s.extra_rdoc_files = ["History.org", "README.org", "bin/org-ruby"] s.files = ["History.org", "README.org", "bin/org-ruby", "lib/org-ruby.rb", "lib/org-ruby/headline.rb", "lib/org-ruby/html_output_buffer.rb", "lib/org-ruby/html_symbol_replace.rb", "lib/org-ruby/line.rb", "lib/org-ruby/output_buffer.rb", "lib/org-ruby/parser.rb", "lib/org-ruby/regexp_helper.rb", "lib/org-ruby/markdown_output_buffer.rb", "lib/org-ruby/textile_output_buffer.rb", "lib/org-ruby/textile_symbol_replace.rb", "lib/org-ruby/tilt.rb", "lib/org-ruby/version.rb"] s.homepage = "https://github.com/wallyqs/org-ruby" s.require_paths = ["lib"] s.rubyforge_project = "org-ruby" s.rubygems_version = "1.8.10" s.summary = "This gem contains Ruby routines for parsing org-mode files." s.license = "MIT" if s.respond_to? :specification_version then s.specification_version = 3 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q, ["~> 0.2"]) else s.add_dependency(%q, ["~> 0.2"]) end else s.add_dependency(%q, ["~> 0.2"]) end end ruby-org-0.9.12/org/000077500000000000000000000000001257631261400141475ustar00rootroot00000000000000ruby-org-0.9.12/org/bench.org000066400000000000000000000013561257631261400157440ustar00rootroot00000000000000#+TITLE: OrgRuby simple benchmark Straighforward benchmark of the performance of the library: #+name: benchmark #+BEGIN_SRC ruby require 'org-ruby' require 'benchmark' def run_html_output_benchmark(n=30) org_content = File.open('bench.org').read puts "Parsing #{n} times" Benchmark.bmbm do |x| x.report('html conversion') do n.times do Orgmode::Parser.new(org_content).to_html end end end end def run_parsing_file_benchmark(n=30) puts "Parsing #{n} times" x.report('textile conversion') do n.times do Orgmode::Parser.load('bench.org') end end end puts "Running benchmark using OrgRuby version #{OrgRuby::VERSION} with Ruby #{RUBY_VERSION}" run_html_output_benchmark(100) #+END_SRC ruby-org-0.9.12/org/org-install.org000066400000000000000000000016641257631261400171220ustar00rootroot00000000000000#+TITLE: Installing latest Org mode #+runmode: idempotent #+startup: showeverything * TODO Manual install #+name: org-mode-git-cloned #+BEGIN_SRC sh [ -e src/org-mode/.git ] #+END_SRC #+name: git-clone-org-mode #+BEGIN_SRC sh :unless org-mode-git-cloned mkdir src git clone git://orgmode.org/org-mode.git src/org-mode #+END_SRC ** COMMENT Compile step Example of doing this in OS X, should be done on a fresh install as well (=-Q=) #+name: compile #+BEGIN_SRC sh :dir src/org-mode :affinity osx # OS X setup export EMACS="/Applications/Emacs.app/Contents/MacOS/Emacs" $EMACS -batch -Q -L lisp -l ../mk/org-fixup -f org-make-autoloads-compile-force #+END_SRC * DONE Updating Org mode to 0.8.2 with ELPA Most straighforward way of doing this is as follows: - Open a fresh Emacs with -q option <-- Important: Otherwise the install breaks and some symbols become undefined - M-x package-install RET org-mode RET - Start Emacs once again ruby-org-0.9.12/org/releasing.org000066400000000000000000000007121257631261400166310ustar00rootroot00000000000000#+TITLE: Releasing a new version of the gem #+runmode: idempotent - Bump the current version #+begin_src ruby :tangle lib/org-ruby/version.rb module OrgRuby VERSION = '0.9.12' end #+end_src - Create the gem #+name: build-the-gem #+begin_src sh gem build org-ruby.gemspec #+end_src - Run tests on the following platforms #+begin_src yaml :tangle .travis.yml rvm: - 1.9.3 - 2.0.0 - 2.1.2 - 2.2.0-dev notifications: disabled: true #+end_src ruby-org-0.9.12/spec/000077500000000000000000000000001257631261400143125ustar00rootroot00000000000000ruby-org-0.9.12/spec/data/000077500000000000000000000000001257631261400152235ustar00rootroot00000000000000ruby-org-0.9.12/spec/data/freeform-example.org000066400000000000000000000100171257631261400211710ustar00rootroot00000000000000#+BEGIN_EXAMPLE #+TITLE: Freeform #+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-20 Sun #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+END_EXAMPLE Freeform This is my todo list, research file, and log record from working on the Freeform project. * Future ideas :someday: :PROPERTIES: :DATE: 2009-11-26 :SLUG: future-ideas :END: - Add *posts* - Enforce uniqueness of url_token - Add FeedSync support - Auto-recognize URLs - Edit in place - Import/export of content. I want it to be safe to store real content on the site. - Page reordering. - AtomPub support. - Organization: - Move pages around - Add tags and navigation by tags - Add a breadcrumb bar * TODO Add versioning support :current:feature: ** DONE UI rough-in CLOSED: [2009-11-26 Thu] ** DONE Author logging CLOSED: [2009-11-27 Fri] ** DONE Version table and model updates CLOSED: [2009-11-28 Sat 22:40] CLOCK: [2009-11-28 Sat 21:35]--[2009-11-28 Sat 22:40] => 1:05 CLOCK: [2009-11-28 Sat 21:01]--[2009-11-28 Sat 21:25] => 0:24 CLOCK: [2009-11-28 Sat 19:46]--[2009-11-28 Sat 20:54] => 1:08 CLOCK: [2009-11-28 Sat 14:38]--[2009-11-28 Sat 15:08] => 0:30 CLOCK: [2009-11-28 Sat 13:21]--[2009-11-28 Sat 14:37] => 1:16 OK, my current thinking is to have each idea have many Changes. A change has many change records. A change record is a list of specific attributes that change, and includes the old and the new values. I'll use callbacks on the Idea model to maintain the changes. *** DONE Create version method CLOSED: [2009-11-28 Sat 22:40] *** DONE Make current method CLOSED: [2009-11-28 Sat 22:40] ** Update pages controller *** DONE Show versions CLOSED: [2009-11-30 Mon 00:34] CLOCK: [2009-11-29 Sun 21:27]--[2009-11-29 Sun 21:54] => 0:27 CLOCK: [2009-11-29 Sun 15:40]--[2009-11-29 Sun 15:44] => 0:04 CLOCK: [2009-11-28 Sat 22:44]--[2009-11-28 Sat 23:50] => 1:06 I'm now at the point where I *list* versions, but I can't show them. - [X] I currently suspect that I broke my version recovery code when I switched the order of the idea_changes. I need to investigate why nothing's failing in the tests; I expected failures. Possible addition to test: start looking at those version numbers. OK, here's what was going on: In the test, you need to reload the idea_changes array from the database to get the database sort order. I also make sure I do this inside the Idea methods. **** DONE Write a test for Idea::attributes_for_change CLOSED: [2009-11-29 Sun 23:59] CLOCK: [2009-11-29 Sun 23:47]--[2009-11-29 Sun 23:58] => 0:11 CLOCK: [2009-11-29 Sun 22:02]--[2009-11-29 Sun 23:42] => 1:40 CLOCK: [2009-11-29 Sun 21:54]--[2009-11-29 Sun 21:56] => 0:02 *** DONE Write integration tests that cover versions. CLOSED: [2009-12-11 Fri 23:25] CLOCK: [2009-12-11 Fri 20:27]--[2009-12-11 Fri 23:25] => 2:58 *** DONE Recover versions CLOSED: [2009-12-12 Sat 22:09] CLOCK: [2009-12-12 Sat 21:02]--[2009-12-12 Sat 22:09] => 1:07 CLOCK: [2009-12-12 Sat 20:13]--[2009-12-12 Sat 21:00] => 0:47 *** DONE Move to recycle bin CLOSED: [2009-12-12 Sat 22:59] CLOCK: [2009-12-12 Sat 22:23]--[2009-12-12 Sat 22:59] => 0:36 Note I'm avoiding logging delete operations because I'm presuming there will be a recycle bin, and therefore the *pages* controller will never actually delete files. At some point, when I want to support full FeedSync, I'll need to tackle this. The other timebomb: I don't know how well my logging scheme will work when pages move. I don't yet know if I will address this in the current sprint. ruby-org-0.9.12/spec/data/freeform.org000066400000000000000000000101261257631261400175410ustar00rootroot00000000000000#+TITLE: Freeform #+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-20 Sun #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil todo:t pri:nil tags:not-in-toc #+OPTIONS: ':t *:t -:t arch:headline author:t c:nil #+OPTIONS: creator:comment d:(not LOGBOOK) date:t e:t email:nil inline:t #+OPTIONS: p:nil stat:t tasks:t tex:t timestamp:t #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: Freeform This is my todo list, research file, and log record from working on the Freeform project. * Future ideas :someday: - Add *posts* - Enforce uniqueness of url_token - Add FeedSync support - Auto-recognize URLs - Edit in place - Import/export of content. I want it to be safe to store real content on the site. - Page reordering. - AtomPub support. - Organization: - Move pages around - Add tags and navigation by tags - Add a breadcrumb bar * TODO Add versioning support :current:feature: ** DONE UI rough-in CLOSED: [2009-11-26 Thu] ** DONE Author logging CLOSED: [2009-11-27 Fri] ** DONE Version table and model updates CLOSED: [2009-11-28 Sat 22:40] CLOCK: [2009-11-28 Sat 21:35]--[2009-11-28 Sat 22:40] => 1:05 CLOCK: [2009-11-28 Sat 21:01]--[2009-11-28 Sat 21:25] => 0:24 CLOCK: [2009-11-28 Sat 19:46]--[2009-11-28 Sat 20:54] => 1:08 CLOCK: [2009-11-28 Sat 14:38]--[2009-11-28 Sat 15:08] => 0:30 CLOCK: [2009-11-28 Sat 13:21]--[2009-11-28 Sat 14:37] => 1:16 OK, my current thinking is to have each idea have many Changes. A change has many change records. A change record is a list of specific attributes that change, and includes the old and the new values. I'll use callbacks on the Idea model to maintain the changes. *** DONE Create version method CLOSED: [2009-11-28 Sat 22:40] *** DONE Make current method CLOSED: [2009-11-28 Sat 22:40] ** Update pages controller *** DONE Show versions CLOSED: [2009-11-30 Mon 00:34] CLOCK: [2009-11-29 Sun 21:27]--[2009-11-29 Sun 21:54] => 0:27 CLOCK: [2009-11-29 Sun 15:40]--[2009-11-29 Sun 15:44] => 0:04 CLOCK: [2009-11-28 Sat 22:44]--[2009-11-28 Sat 23:50] => 1:06 I'm now at the point where I *list* versions, but I can't show them. - [X] I currently suspect that I broke my version recovery code when I switched the order of the idea_changes. I need to investigate why nothing's failing in the tests; I expected failures. Possible addition to test: start looking at those version numbers. OK, here's what was going on: In the test, you need to reload the idea_changes array from the database to get the database sort order. I also make sure I do this inside the Idea methods. **** DONE Write a test for Idea::attributes_for_change CLOSED: [2009-11-29 Sun 23:59] CLOCK: [2009-11-29 Sun 23:47]--[2009-11-29 Sun 23:58] => 0:11 CLOCK: [2009-11-29 Sun 22:02]--[2009-11-29 Sun 23:42] => 1:40 CLOCK: [2009-11-29 Sun 21:54]--[2009-11-29 Sun 21:56] => 0:02 *** DONE Write integration tests that cover versions. CLOSED: [2009-12-11 Fri 23:25] CLOCK: [2009-12-11 Fri 20:27]--[2009-12-11 Fri 23:25] => 2:58 *** DONE Recover versions CLOSED: [2009-12-12 Sat 22:09] CLOCK: [2009-12-12 Sat 21:02]--[2009-12-12 Sat 22:09] => 1:07 CLOCK: [2009-12-12 Sat 20:13]--[2009-12-12 Sat 21:00] => 0:47 *** DONE Move to recycle bin CLOSED: [2009-12-12 Sat 22:59] CLOCK: [2009-12-12 Sat 22:23]--[2009-12-12 Sat 22:59] => 0:36 Note I'm avoiding logging delete operations because I'm presuming there will be a recycle bin, and therefore the *pages* controller will never actually delete files. At some point, when I want to support full FeedSync, I'll need to tackle this. The other timebomb: I don't know how well my logging scheme will work when pages move. I don't yet know if I will address this in the current sprint. ruby-org-0.9.12/spec/data/hyp-planning.org000066400000000000000000000573421257631261400203530ustar00rootroot00000000000000#+TITLE: Introduction to Hyper-V Pre-Planning and Planning #+AUTHOR: Brian Dewey #+EMAIL: bdewey@microsoft.com #+DATE: December 9, 2009 #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:nil #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:nil #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: * DONE Introduction CLOSED: [2009-12-09 Wed 15:18] CLOCK: [2009-12-09 Wed 15:00]--[2009-12-09 Wed 15:18] => 0:18 CLOCK: [2009-12-09 Wed 10:02]--[2009-12-09 Wed 10:14] => 0:12 The pre-planning activities for Hyper-V proceeded in three phases. In the first phase, we identified and wrote down a set of /business value propositions./ These are things we could pitch to customers as new value they would get from using Windows 8. To wrap up phase one, we worked with Mike Neil's team in Windows Server to rank the business value propositions. This step ensured that COSD and Windows Server operated from a common, agreed-upon set of priorities. For the second phase of pre-planning, we brainstormed all of the features we would need to implement to deliver on the value propositions from phase one. We captured a short description of each potential feature in a one-page spec. In the final phase of pre-planning, the dev team estimated how much dev effort would be required to implement each feature. By the numbers, our pre-planning work generated: - 19 different value propositions - 159 one-page specs - A 770-line spreadsheet containing dev estimates - 4.5 times the amount of dev work than we can tackle in a single release Moving from pre-planning to planning, our objective has been to understand and to shape overall Windows priorities so we can pick the /right/ 20% of work to commit to for Windows 8. This document gives an overview of the different pre-planning activities we did. It provides pointers to the pre-planning artefacts we produced and shows how we've been able to map our pre-planning work into planning. * Business Value Propositions CLOCK: [2009-12-07 Mon 09:09]--[2009-12-07 Mon 09:50] => 0:41 CLOSED: [2009-12-01 Tue 10:52] One of the first pre-planning activities we did in Hyper-V was define a set of /business value propositions/ (BVPs). A business value proposition is an end-to-end hook that can convince a customer that Windows 8 is worth buying. Our BVPs are stored in the [[http://windows/hyper-v/initiatives/Value%20Propositions/Forms/AllItems.aspx][Hyper-V Portal]]. ** Anatomy of a BVP Each BVP followed a simple, one-page template with the following parts: - Customer Summary - Storyboard - Requirements - Partner teams The following sections walk through each section and give an example from one of our BVPs, [[http://windows/hyper-v/initiatives/Value Propositions/DynamicDatacenter-ValueProp.docx][Resource-Smart Virtualization Infrastructure]] (also called /Dynamic Datacenter/). *** Customer Summary The /customer summary/ section is a one-sentence description of the customer value proposition, written from the customer's point of view. Each customer summary starts with the phrase, /I want.../ The purpose of this section is to make sure we can give a concise description of what we expect the customer to accomplish. #+BEGIN_QUOTE /Example:/ I want to add or remove computing resources to company owned virtualization infrastructure automatically, on-demand in response to rapidly changing business needs without any loss of business availability. #+END_QUOTE *** Storyboard To help people understand the customer scenario, the /storyboard/ section walks through the steps the customer would take to get the new value from Windows 8. #+BEGIN_QUOTE /Example:/ Comsco warehouse IT provides access to multitudes of different workloads including database servers, LOB applications, and homegrown three-tier distributed applications spread across two sites. Tim, administrator at Comsco IT, wants to see VM life cycle management (create, deploy, service, move and destroy) utilizing their existing tools and want it to be more efficient process than managing physical servers. Tim wants Microsoft software to automatically create new VM on server from a pool of physical servers and deploy workload in the VM when combined criteria of load balancing and resource utilization he defined are met. While Tim will continue to monitor real-time usage and Joe, who works in CIO office, wants historical trending of resource utilization of CPU, memory, power, storage, network bandwidth, storage bandwidth and backup bandwidth for selected VMs and workloads across all the servers. Based on historical trend analysis, Tim receives business logic requirements from the office of CIO and he defines per VM multi dimensional policy in Microsoft software to automatically control resource usage allocation, resource prioritization and resource move for above resource types. Tim also wants to service storage hardware without any downtime to running workloads. Tim wants MS software to freely move workloads between his primary site and across the town secondary site as needed without any downtime. #+END_QUOTE *** Requirements This section captures the core requirements for delivering the customer value. Knowing we would not be able to do everything, we categorized requirements into those needed for delivering good value, a better value, and best value. To minimize the randomization that could come from the bucketing, we identified the customers who would be satisfied by a given level of value. #+BEGIN_QUOTE /Example:/ | Target Level | Customer | Example Requirements | |--------------+-----------------------------------------+-----------------------------------------------| | Good | Large/medium enterprises | Storage migration with zero business downtime | | Better | Early adopters at the Dyanmic I/O model | VM migration for load balancing | | Best | Hosters | Chargeback infrastructure | #+END_QUOTE *** Partner teams Because BVPs describe end-to-end value, none can be delivered just from the Hyper-V team. This section notes the partner teams we would need to reach out to. #+BEGIN_QUOTE /Example:/ SCVMM, Failover clustering, Kernel, Intel & AMD #+END_QUOTE ** BVP Ranking Working with Mike Neil's team, the Hyper-V trio and PM leads ranked the BVPs based on the information we'd gathered through CFD sessions and on the importance of competing with VMWare. The consensus opinion is stored in a spreadsheet [[http://windows/hyper-v/initiatives/Value Propositions/ValueProposition-BucketTemplate-Master.xlsx][here]]. For each BVP, we also identified the target value level -- would we aim for good value, better value, or best value? Here's our ranked BVP list. | Value Proposition | Customer Statement | Target Bucket | |----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------| | Resource-Smart Virtualization Infrastructure | I want to add or remove computing resources to company owned virtualization infrastructure automatically, on-demand in response to rapidly changing business needs without any loss of business availability. | Best | | Server High Availability | I want to ensure that my server applications are highly available. | Better | | Server Disaster Recovery | I want to ensure my business can quickly resume operations in the event of a disaster. | Better | | Platform Extensibility | I want a rich ecosystem so I'm not locked into a single vendor for storage, networking, etc. | Better | | Hosting | I need to be able to deploy thousands of physical servers into one or more farms dedicated for hosting. Provisioning of virtual machines must integrate fully into my back end network topology. Virtual machines must have strong network isolation. I must be able to monitor, change, charge for and throttle usage dynamically. I must be able to move virtual machines to another server in my farm with little or no downtime. | Better | | Scale Up | I want to get the maximum utilization from my hardware investment. | Better | | VDI | I want to control cost by deploying thin desktops and letting employees connect to a completely virtualized desktop. | Better | | Cloud Integration | I want to be able to dynamically enable movement of workloads between on premise and off premise without changing the operational or application model. | Better | | Security | I want to enhance the security of my system by making it more difficult for malicious programs to attack my operating system core. | Good | | Deployment | I want to increase efficiency in managing my datacenter & desktop infrastructure. | Better | | Green IT | I want to increase energy efficiency in my datacenter infrastructure. | Good | | Server test/dev | I want to quickly and easily create and test server applications. | Good | | Appliance Development Model | I want to reduce development costs by shipping a server application in a pre-configured VM. | Good | | Application Compatibility | I want users to have access to old applications even when I upgrade their desktop operating systems. | Cut | | Client test/dev | I want to quickly and easily create and test desktop applications | Cut | | Integration Testing | I want to quickly and easily test new applications and updates before deploying them | Cut | | Employee-owned hardware | I want to let employees use their own hardware to run corporate applications and connect to the corporate network in a secure way. | Cut | * DONE One-Page Specs SCHEDULED: <2009-12-07 Mon> CLOSED: [2009-12-07 Mon 16:39] CLOCK: [2009-12-07 Mon 16:26]--[2009-12-07 Mon 16:39] => 0:13 Armed with the prioritized list of customer value propositions to consider for Windows 8, we started work on the next level of detail: What features would we need to implement to deliver the value proposition? Two main tasks refined our thinking in this area. First, we brainstormed all of the features required to deliver the target level of value in the BVP. Then, to reduce ambiguity, we wrote a /one page spec/ for each feature. What exactly does /cross-cluster live migration/ mean? The one-page spec tells you. The goal of the one page spec was to capture just enough information that a developer could estimate how expensive the feature would be to implement. Our one-page spec library is [[http://windows/hyper-v/w8/Specs/Forms/AllItems.aspx][here]]. #+BEGIN_QUOTE /Example: Cross-cluster live migration/ Key customer scenario: An enterprise is building large scale Hyper-V based infrastructure to run vast majority of server workloads with High-Availability is a requirement. Customer builds multiple clusters for one or more of the following business needs: # NOTE, for formatting reasons, don't fill the following. - To keep cluster size to be manageable based on preconceived perception of node failure time is linearly proportional to cluster size, - Due to increased business need they need to build new cluster once maximum supported cluster size is reached, - There are departmental clusters and temporarily there is a need to use extra capacity of a cluster when one cluster experiences capacity peaks. Customer would like ability to live migrate, quick migrate or move VMs from one cluster to other cluster for above mentioned needs. The goal is to provide more flexibility in VM mobility space without cluster as a boundary. Hyper-V needs to perform two operations in a transaction: - Live migrate VM from one cluster node to destination cluster node. - Live migrate VM’s storage from one cluster’s shared storage to another cluster’s shared storage. If any of the above fails, VM must continue to run on the source node. A user should be able to orchestrate live migration through Hyper-V manager, Failover cluster UI, WMI or Powershell. Live migration should perform necessary checks to ensure live migration requirements are met. Some of the examples in addition to other migration checks are, performing estimation of time to migrate VM, access to the VM storage and same IP network on destination to ensure VM will be able to migrate successfully without dropping a TCP connection. If Hyper-V cannot reliably guaranty retaining TCP connection live migration should fail and must ensure VM continues to run on source node. Administrator should be able to set cluster wide, Hyper-V wide or per VM policies around allowing or denying live migrating one or more VMs from one cluster to any particular cluster or any other cluster. User experience and workflow of orchestrating live migration within a cluster or across the cluster site should be the same. #+END_QUOTE * DONE Feature SWAGS CLOSED: [2009-12-09 Wed 08:57] CLOCK: [2009-12-09 Wed 08:46]--[2009-12-09 Wed 08:57] => 0:11 SCHEDULED: <2009-12-07 Mon> Using the one-page specs, the dev team estimated the dev time it would take to implement each feature identified to deliver on the business value propositions. The estimates are kept in this [[http://windows/hyper-v/w8/BVP/BVP%20Feature%20Expansion.xlsx][spreadsheet]]. The estimaes are fine-grained. To stretch an analogy, instead of t-shirt sizes, we've got estimates of the yards of thread required to make the t-shirt. For each feature we identified in the BVP process, the dev team estimated how to break apart the work and estimated the number of weeks of senior, mid-level, and junior dev time it would take to implement the feature. The key conclusion from the exercise: Our eyes are *way* bigger than our wallets. In the BVP process, we identified about five times as much work as we will be able to deliver in Windows 8. * DONE Moving From Pre-Planning to Planning CLOSED: [2009-12-09 Wed 15:20] CLOCK: [2009-12-09 Wed 09:56]--[2009-12-09 Wed 10:01] => 0:05 CLOCK: [2009-12-09 Wed 09:00]--[2009-12-09 Wed 09:01] => 0:01 Pre-planning identified a significant amount of work we /could/ do in Windows 8. Our challenge in planning has been to identify the 20% of the work on our list that best aligns with the overall Windows vision, so we can commit to this as work we /will/ do for Windows 8. The business value propositions we defined in pre-planning lined up well with planning themes & subthemes. As we moved from pre-planning to planning, we narrowed down the list of BVPs that we focused on, and we worked through the established theme & subtheme planning. Through the Windows planning process, we have been able to work with our partner teams to find alignment on priorities. The following table shows how we mapped our BVPs to planning themes for the planning process. | BVP | Planning Theme (Subtheme) | |--------------------------------------------------------------------------+----------------------------------------------------------------------------------------| | Resource-Smart Virtualization Infrastructure, Hosting, Cloud Integration | Infrastructure Scaled for SMB, Enterprise, & Service Providers (Hosted Private Clouds) | | Server High Availability | Continuous Availability (Contiuous Availability) | | Server Disaster Recovery | Continuous Availability (Business Continuity) | | Platform Extensibility | Big Bet: Scale for Datacenters | | Scale Up, Green IT | Infrastructure Scaled... (Leverage the Hardware Ecosystem) | | VDI | Work Anywhere (Centralized Desktops) | | Deployment | Management (Solution Deployment) | | Server test/dev, Client test/dev | Streamline the developer experience *or* Desktop for enthusiasts | | Appliance Development Model | Infrastructure Scaled... (Virtual Appliance for Partners) | * TODO Conclusion Because of our pre-planning work, we've had good alignment between COSD (and now Windows Core) and Windows Server on overall Hyper-V priorities and directions. The work on estimating feature costs has enabled us to set realistic expectations on the scope of work we can deliver in Windows 8. Taken together, our pre-planning work should have made Hyper-V a more predictable and transparent partner team to work with in the planning process. ruby-org-0.9.12/spec/data/remember.org000066400000000000000000000040361257631261400175350ustar00rootroot00000000000000* New Ideas ** YAML header in Webby Make sure you don't have TABS here. Best practice: Configure your editor to use spaces instaed of tabs, and if you can see whitespace, even better. In emacs, set indent-tabs-mode to NIL. ** Ruby Gems behind Proxy Set the following environment variable: So, I added a User Variable for my account called http_proxy with the value of http://:8080, rebooted, ran plan old vanillia gem install rails –include-dependencies, and magically, it worked ** Hyper-V technical info http://technet.microsoft.com/en-us/dd565807.aspx ** VirtualBox Virtualization software from Sun. Looks like it might be more for dev/test. I'm surprised this hasn't popped at all. http://www.virtualbox.org/. Backed by Sun. ** Interesting LaTeX article http://nitens.org/taraborelli/latex -- on the virtues of LaTeX ** XEmacs / Emacs internals Looks like an interesting resource if I want to learn how Emacs works. http://www.xemacs.org/Documentation/21.5/html/internals_9.html#SEC19 ** MikTeX Get it here: http://www.miktex.org/portable/ ** Orgmode publishing tutorial [[http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php][Publishing Org-mode files to HTML]] ** Git and Live Mesh This is really helpful: http://whereslou.com/2009/06/04/using-live-mesh-and-git-the-best-of-both-worlds ** VDI deployment stats Key takeaways: - 74% are using VDI in production or pilot ... but 45% of those using have less than 100 users - Upward of 55% of the DAC members [project] they will have up to 50% of their users using VDI in 3 years (~1/2 of those will have > 50%) - No real surprises on the reasons / benefits etc - Interestingly ... even if TS supported all client apps / supported user-install apps - 100% of the DAC preferred VDI over TS - Most companies said a portion of their users would have VDI as the primary replacement desktop (60% < 20% of users, 32% 21-50% of users) ** Hyper-V Scheduler Information http://msdn.microsoft.com/en-us/library/bb969782.aspx ruby-org-0.9.12/spec/data/tables.org000066400000000000000000000001541257631261400172060ustar00rootroot00000000000000* a table with hline at the beginning |-----+-----| | foo | bar | |-----+-----| | 1 | 2 | * not a table ruby-org-0.9.12/spec/headline_spec.rb000066400000000000000000000035551257631261400174320ustar00rootroot00000000000000require 'spec_helper' describe Orgmode::Headline do it "should recognize headlines that start with asterisks" do expect(Orgmode::Headline.headline?("*** test\n")).to be_truthy end it "should reject headlines without headlines at the start" do expect(Orgmode::Headline.headline?(" nope!")).to be_nil expect(Orgmode::Headline.headline?(" tricked you!!!***")).to be_nil end it "should reject improper initialization" do expect { Orgmode::Headline.new " tricked**" }.to raise_error end it "should properly determine headline level" do samples = ["* one", "** two", "*** three", "**** four"] expected = 1 samples.each do |sample| h = Orgmode::Headline.new sample expect(h.level).to eql(expected) expected += 1 end end it "should properly determine headline level with offset" do h = Orgmode::Headline.new("* one", nil, 1) expect(h.level).to eql(2) end it "should find simple headline text" do h = Orgmode::Headline.new "*** sample" expect(h.headline_text).to eql("sample") end it "should understand tags" do h = Orgmode::Headline.new "*** sample :tag:tag2:\n" expect(h.headline_text).to eql("sample") expect(h.tags.count).to eq(2) expect(h.tags[0]).to eql("tag") expect(h.tags[1]).to eql("tag2") end it "should understand a single tag" do h = Orgmode::Headline.new "*** sample :tag:\n" expect(h.headline_text).to eql("sample") expect(h.tags.count).to eq(1) expect(h.tags[0]).to eql("tag") end it "should understand keywords" do h = Orgmode::Headline.new "*** TODO Feed cat :home:" expect(h.headline_text).to eql("Feed cat") expect(h.keyword).to eql("TODO") end it "should recognize headlines marked as COMMENT" do h = Orgmode::Headline.new "* COMMENT This headline is a comment" expect(h.comment_headline?).to_not be_nil end end ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/000077500000000000000000000000001257631261400236035ustar00rootroot00000000000000ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/advanced-code-coderay.html000066400000000000000000000242451257631261400306010ustar00rootroot00000000000000

advanced-code-coderay.org

Turns out there’s more way to do code than just BEGIN_EXAMPLE.

1 Inline examples

This should work:

  fixed width? how does this work?   
                        ...........
                       ............
                                  .
                       .  .   .   .
                       .          ..
                       ....... .....
                           .  .
                           ....

Two ASCII blobs.

2 BEGIN_SRC

And this:

# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end

Now let’s test case-insensitive code blocks.

# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end
(def fib-seq
  (concat
   [0 1]
   ((fn rfib [a b]
        (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
 
user> (take 20 fib-seq)
(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)

Even if no language is set, it is still wrapped in code tags but class is empty.

echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers

3 It should be possible to write a colon at the beginning of an example

I really love to write about :symbols. They sure are the best things in the world!

{
:one => 1,
:two => 2
}
(defproject helloworld "0.1"
:dependencies [[org.clojure/clojure
                 "1.1.0-master-SNAPSHOT"]
              [org.clojure/clojure-contrib
                 "1.0-SNAPSHOT"]]
:main helloworld)

4 Code syntax highlight with Coderay

4.1 No language selected

Nothing to see here

4.2 CSS example

* {
 /* apply a natural box layout model to all elements */
 box-sizing: border-box; 
 -moz-box-sizing: border-box; 
 -webkit-box-sizing: border-box; 
}

4.3 HTML example

<html>
  <head>
    <title>Hello</title>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>

4.4 Ruby example

class Post << ActiveRecord::Base
  def print_title
    puts "#{self.title}"
  end
end

4.5 Python example

import mapnik

m = mapnik.Map(600, 800)
m.background = Map.Color('steelblue')

4.6 Javascript example

exports = this;

(function($){

var Posts = {};

Posts.index = function(){
// TODO
};

})(jQuery);

4.7 JSON example

{ name: "Waldemar"
, surname: "Quevedo"
}

4.8 PHP example

echo "Hello";
phpinfo();
var_dump(some_var);

4.9 Elisp example

(defun hello()
  (interactive)
  (message "hello"))

4.10 Not supported language example

!+!+++!++!++!++!+
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/advanced-code-coderay.org000066400000000000000000000075241257631261400304250ustar00rootroot00000000000000#+TITLE: advanced-code-coderay.org #+AUTHOR: Brian Dewey #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-30 Wed #+DESCRIPTION: More types of code support #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: Turns out there's more way to do code than just BEGIN_EXAMPLE. * Inline examples This should work: : fixed width? how does this work? : ........... : ............ : . : . . . . : . .. : ....... ..... : . . : .... Two ASCII blobs. * BEGIN_SRC :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: And this: #+BEGIN_SRC ruby # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end #+END_SRC Now let's test case-insensitive code blocks. #+begin_src ruby # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end #+end_src #+begin_src clojure (def fib-seq (concat [0 1] ((fn rfib [a b] (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1))) user> (take 20 fib-seq) (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181) #+end_src Even if no language is set, it is still wrapped in code tags but class is empty. #+BEGIN_SRC echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers #+END_SRC * It should be possible to write a colon at the beginning of an example #+BEGIN_QUOTE I really love to write about :symbols. They sure are the best things in the world! #+END_QUOTE #+BEGIN_SRC ruby { :one => 1, :two => 2 } #+END_SRC #+BEGIN_SRC clojure (defproject helloworld "0.1" :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"]] :main helloworld) #+END_SRC * Code syntax highlight with Coderay ** No language selected #+BEGIN_SRC Nothing to see here #+END_SRC ** CSS example #+BEGIN_SRC css * { /* apply a natural box layout model to all elements */ box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } #+END_SRC ** HTML example #+BEGIN_SRC html Hello

Hello

#+END_SRC ** Ruby example #+BEGIN_SRC ruby class Post << ActiveRecord::Base def print_title puts "#{self.title}" end end #+END_SRC ** Python example #+BEGIN_SRC python import mapnik m = mapnik.Map(600, 800) m.background = Map.Color('steelblue') #+END_SRC ** Javascript example #+BEGIN_SRC javascript exports = this; (function($){ var Posts = {}; Posts.index = function(){ // TODO }; })(jQuery); #+END_SRC ** JSON example #+BEGIN_SRC json { name: "Waldemar" , surname: "Quevedo" } #+END_SRC ** PHP example #+BEGIN_SRC php echo "Hello"; phpinfo(); var_dump(some_var); #+END_SRC ** Elisp example #+BEGIN_SRC emacs-lisp (defun hello() (interactive) (message "hello")) #+END_SRC ** Not supported language example #+BEGIN_SRC notsupported !+!+++!++!++!++!+ #+END_SRC ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/advanced-code-no-color.html000066400000000000000000000043411257631261400306760ustar00rootroot00000000000000

advanced-code.org

Turns out there’s more way to do code than just BEGIN_EXAMPLE.

1 Inline examples

This should work:

  fixed width? how does this work?   
                        ...........
                       ............
                                  .
                       .  .   .   .
                       .          ..
                       ....... .....
                           .  .
                           ....

Two ASCII blobs.

2 BEGIN_SRC

And this:

# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end

Now let’s test case-insensitive code blocks.

# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end
(def fib-seq
  (concat
   [0 1]
   ((fn rfib [a b]
        (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
 
user> (take 20 fib-seq)
(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)

Even if no language is set, it is still wrapped in code tags but class is empty.

echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers

3 It should be possible to write a colon at the beginning of an example

I really love to write about :symbols. They sure are the best things in the world!

{
:one => 1,
:two => 2
}
(defproject helloworld "0.1"
:dependencies [[org.clojure/clojure
                 "1.1.0-master-SNAPSHOT"]
              [org.clojure/clojure-contrib
                 "1.0-SNAPSHOT"]]
:main helloworld)
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/advanced-code-no-color.org000066400000000000000000000051731257631261400305250ustar00rootroot00000000000000#+TITLE: advanced-code.org #+AUTHOR: Brian Dewey #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-30 Wed #+DESCRIPTION: More types of code support #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: Turns out there's more way to do code than just BEGIN_EXAMPLE. * Inline examples This should work: : fixed width? how does this work? : ........... : ............ : . : . . . . : . .. : ....... ..... : . . : .... Two ASCII blobs. * BEGIN_SRC :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: And this: #+BEGIN_SRC ruby # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end #+END_SRC Now let's test case-insensitive code blocks. #+begin_src ruby # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end #+end_src #+begin_src clojure (def fib-seq (concat [0 1] ((fn rfib [a b] (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1))) user> (take 20 fib-seq) (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181) #+end_src Even if no language is set, it is still wrapped in code tags but class is empty. #+BEGIN_SRC echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers #+END_SRC * It should be possible to write a colon at the beginning of an example #+BEGIN_QUOTE I really love to write about :symbols. They sure are the best things in the world! #+END_QUOTE #+BEGIN_SRC ruby { :one => 1, :two => 2 } #+END_SRC #+BEGIN_SRC clojure (defproject helloworld "0.1" :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"]] :main helloworld) #+END_SRC ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/advanced-code-pygments.html000066400000000000000000000246001257631261400310140ustar00rootroot00000000000000

advanced-code.org

Turns out there’s more way to do code than just BEGIN_EXAMPLE.

1 Inline examples

This should work:

  fixed width? how does this work?   
                        ...........
                       ............
                                  .
                       .  .   .   .
                       .          ..
                       ....... .....
                           .  .
                           ....

Two ASCII blobs.

2 BEGIN_SRC

And this:

# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end

Now let’s test case-insensitive code blocks.

# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
  str.scan(@org_emphasis_regexp) do |match|
    yield $2, $3
  end
end
(def fib-seq
  (concat
   [0 1]
   ((fn rfib [a b]
        (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
 
user> (take 20 fib-seq)
(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)

Even if no language is set, it is still wrapped in code tags but class is empty.

echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers

3 It should be possible to write a colon at the beginning of an example

I really love to write about :symbols. They sure are the best things in the world!

{
:one => 1,
:two => 2
}
(defproject helloworld "0.1"
:dependencies [[org.clojure/clojure
                 "1.1.0-master-SNAPSHOT"]
              [org.clojure/clojure-contrib
                 "1.0-SNAPSHOT"]]
:main helloworld)

4 Code syntax highlight with Pygments

4.1 No language selected

<script>alert('hello world')</script>

4.2 CSS example

* {
 /* apply a natural box layout model to all elements */
 box-sizing: border-box; 
 -moz-box-sizing: border-box; 
 -webkit-box-sizing: border-box; 
}

4.3 HTML example

<html>
  <head>
    <title>Hello</title>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>

4.4 Ruby example

class Post << ActiveRecord::Base
  def print_title
    puts "#{self.title}"
  end
end

4.5 Python example

import mapnik

m = mapnik.Map(600, 800)
m.background = Map.Color('steelblue')

4.6 Javascript example

exports = this;

(function($){

var Posts = {};

Posts.index = function(){
// TODO
};

})(jQuery);

4.7 JSON example

{ name: "Waldemar"
, surname: "Quevedo"
}

4.8 PHP example

echo "Hello";
phpinfo();
var_dump(some_var);

4.9 Elisp example

(defun hello()
  (interactive)
  (message "hello"))

4.10 Not supported language example

!+!+++!++!++!++!+
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/advanced-code-pygments.org000066400000000000000000000075471257631261400306520ustar00rootroot00000000000000#+TITLE: advanced-code.org #+AUTHOR: Brian Dewey #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-30 Wed #+DESCRIPTION: More types of code support #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: Turns out there's more way to do code than just BEGIN_EXAMPLE. * Inline examples This should work: : fixed width? how does this work? : ........... : ............ : . : . . . . : . .. : ....... ..... : . . : .... Two ASCII blobs. * BEGIN_SRC :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: And this: #+BEGIN_SRC ruby # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end #+END_SRC Now let's test case-insensitive code blocks. #+begin_src ruby # Finds all emphasis matches in a string. # Supply a block that will get the marker and body as parameters. def match_all(str) str.scan(@org_emphasis_regexp) do |match| yield $2, $3 end end #+end_src #+begin_src clojure (def fib-seq (concat [0 1] ((fn rfib [a b] (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1))) user> (take 20 fib-seq) (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181) #+end_src Even if no language is set, it is still wrapped in code tags but class is empty. #+BEGIN_SRC echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers #+END_SRC * It should be possible to write a colon at the beginning of an example #+BEGIN_QUOTE I really love to write about :symbols. They sure are the best things in the world! #+END_QUOTE #+BEGIN_SRC ruby { :one => 1, :two => 2 } #+END_SRC #+BEGIN_SRC clojure (defproject helloworld "0.1" :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"]] :main helloworld) #+END_SRC * Code syntax highlight with Pygments ** No language selected #+BEGIN_SRC #+END_SRC ** CSS example #+BEGIN_SRC css * { /* apply a natural box layout model to all elements */ box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } #+END_SRC ** HTML example #+BEGIN_SRC html Hello

Hello

#+END_SRC ** Ruby example #+BEGIN_SRC ruby class Post << ActiveRecord::Base def print_title puts "#{self.title}" end end #+END_SRC ** Python example #+BEGIN_SRC python import mapnik m = mapnik.Map(600, 800) m.background = Map.Color('steelblue') #+END_SRC ** Javascript example #+BEGIN_SRC javascript exports = this; (function($){ var Posts = {}; Posts.index = function(){ // TODO }; })(jQuery); #+END_SRC ** JSON example #+BEGIN_SRC json { name: "Waldemar" , surname: "Quevedo" } #+END_SRC ** PHP example #+BEGIN_SRC php echo "Hello"; phpinfo(); var_dump(some_var); #+END_SRC ** Elisp example #+BEGIN_SRC emacs-lisp (defun hello() (interactive) (message "hello")) #+END_SRC ** Not supported language example #+BEGIN_SRC notsupported !+!+++!++!++!++!+ #+END_SRC ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-block-exports-coderay.html000066400000000000000000000127401257631261400316250ustar00rootroot00000000000000

Support for :exports options from code blocks

According to the Org mode docs, it is possible to customize whether the code block will be exported or not.

About the #+RESULTS: block

Using Org Babel features, it is possible to set :results output to a code block and render the results within a #+RESULTS: code block:

#+begin_src ruby :results output :exports both
puts "Hello world"
#+end_src

#+RESULTS:
: Hello world

One thing about the #+RESULTS: code blocks, is that they exist in several forms:

  1. As an accumulated group of inline examples:
    #+begin_src python :results output :exports both
    print "like"
    print "this"
    print "etc..."
    #+end_src
    
    #+RESULTS:
    : like
    : this
    : etc...
        
  2. As an example code block.
    #+begin_src ruby :results output :exports both
    10.times {|n| puts n }
    #+end_src
    
    #+RESULTS:
    #+begin_example
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    #+end_example
        
  3. Also, in case :results output code is used, the results would be a src block of the same language as the original one.
    #+begin_src ruby :results output code
    counter = 0
    10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block
    puts counter # Displayed in second code block
    #+end_src
    
    #+RESULTS:
    #+begin_src ruby
    puts '1'
    puts '2'
    puts '3'
    puts '4'
    puts '5'
    puts '6'
    puts '7'
    puts '8'
    puts '9'
    puts '10'
    10
    #+end_src
    
    #+RESULTS:
    : 10
        

Default options

The default is to export only the code blocks.

The following is an code block written in Emacs Lisp and its result should not be exported.

(message "hello world")

The following is a code block written in Python and its result should not be exported.

for i in range(0,12):
  print "import this"

:exports code

Only the code would be in the output, the same as when no option is set.

var message = "Hello world!";

console.log(message);

And as block example too:

var message = "Hello world!";
for (var i = 0; i< 10; i++) {
  console.log(message);
}

:exports none

This omits both the resulting block, and the code block itself.

This should work as well when using an example block.

:exports both

Math::PI + 1
4.14159265358979

Should behave the same when within a block example.

hello = <<HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.
HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.

:exports results

This option can’t be completely supported by OrgRuby since we would have to eval the code block using :lang, so Org Babel features would have to be implemented as well.

But in case the resulting block is within the Org mode file, the code block will be omitted and only the results block would appear.

3.141592653589793

The same should happen when a block example is used instead:

any string
any string
any string
any string
any string
any string
any string
any string
any string
any string
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-block-exports-coderay.org000066400000000000000000000120431257631261400314440ustar00rootroot00000000000000#+TITLE: Support for :exports options from code blocks #+startup: showeverything According to the [[http://orgmode.org/manual/Exporting-code-blocks.html#Exporting-code-blocks][Org mode docs]], it is possible to customize whether the code block will be exported or not. * About the ~#+RESULTS:~ block Using Org Babel features, it is possible to set ~:results output~ to a code block and render the results within a ~#+RESULTS:~ code block: #+begin_src org ,#+begin_src ruby :results output :exports both puts "Hello world" ,#+end_src ,#+RESULTS: : Hello world #+end_src One thing about the ~#+RESULTS:~ code blocks, is that they exist in several forms: 1) As an accumulated group of inline examples: #+begin_src org ,#+begin_src python :results output :exports both print "like" print "this" print "etc..." ,#+end_src ,#+RESULTS: : like : this : etc... #+end_src 2) As an example code block. #+begin_src org ,#+begin_src ruby :results output :exports both 10.times {|n| puts n } ,#+end_src ,#+RESULTS: ,#+begin_example 0 1 2 3 4 5 6 7 8 9 ,#+end_example #+end_src 3) Also, in case ~:results output code~ is used, the results would be a src block of the same language as the original one. #+begin_src org ,#+begin_src ruby :results output code counter = 0 10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block puts counter # Displayed in second code block ,#+end_src ,#+RESULTS: ,#+begin_src ruby puts '1' puts '2' puts '3' puts '4' puts '5' puts '6' puts '7' puts '8' puts '9' puts '10' 10 ,#+end_src ,#+RESULTS: : 10 #+end_src * DONE Default options The default is to export only the code blocks. The following is an code block written in Emacs Lisp and its result should not be exported. #+begin_src emacs-lisp (message "hello world") #+end_src #+RESULTS: : hello world The following is a code block written in Python and its result should not be exported. #+begin_src python :results output for i in range(0,12): print "import this" #+end_src #+RESULTS: #+begin_example import this import this import this import this import this import this import this import this import this import this import this import this #+end_example * DONE :exports code Only the code would be in the output, the same as when no option is set. #+begin_src js :exports code :results output var message = "Hello world!"; console.log(message); #+end_src #+RESULTS: : Hello world! And as block example too: #+begin_src js :exports code :results output var message = "Hello world!"; for (var i = 0; i< 10; i++) { console.log(message); } #+end_src #+RESULTS: #+begin_example Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! #+end_example * DONE :exports none This omits both the resulting block, and the code block itself. #+begin_src python :results output :exports none print 1 # :P #+end_src #+RESULTS: : 1 This should work as well when using an example block. #+begin_src python :results output :exports none for i in range(0,10): print 1 # :P #+end_src #+RESULTS: #+begin_example 1 1 1 1 1 1 1 1 1 1 #+end_example * DONE :exports both #+begin_src ruby :exports both Math::PI + 1 #+end_src #+RESULTS: : 4.14159265358979 Should behave the same when within a block example. #+begin_src ruby :exports both hello = <Support for :exports options from code blocks

According to the Org mode docs, it is possible to customize whether the code block will be exported or not.

About the #+RESULTS: block

Using Org Babel features, it is possible to set :results output to a code block and render the results within a #+RESULTS: code block:

#+begin_src ruby :results output :exports both
puts "Hello world"
#+end_src

#+RESULTS:
: Hello world

One thing about the #+RESULTS: code blocks, is that they exist in several forms:

  1. As an accumulated group of inline examples:
    #+begin_src python :results output :exports both
    print "like"
    print "this"
    print "etc..."
    #+end_src
    
    #+RESULTS:
    : like
    : this
    : etc...
        
  2. As an example code block.
    #+begin_src ruby :results output :exports both
    10.times {|n| puts n }
    #+end_src
    
    #+RESULTS:
    #+begin_example
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    #+end_example
        
  3. Also, in case :results output code is used, the results would be a src block of the same language as the original one.
    #+begin_src ruby :results output code
    counter = 0
    10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block
    puts counter # Displayed in second code block
    #+end_src
    
    #+RESULTS:
    #+begin_src ruby
    puts '1'
    puts '2'
    puts '3'
    puts '4'
    puts '5'
    puts '6'
    puts '7'
    puts '8'
    puts '9'
    puts '10'
    10
    #+end_src
    
    #+RESULTS:
    : 10
        

Default options

The default is to export only the code blocks.

The following is an code block written in Emacs Lisp and its result should not be exported.

(message "hello world")

The following is a code block written in Python and its result should not be exported.

for i in range(0,12):
  print "import this"

:exports code

Only the code would be in the output, the same as when no option is set.

var message = "Hello world!";

console.log(message);

And as block example too:

var message = "Hello world!";
for (var i = 0; i< 10; i++) {
  console.log(message);
}

:exports none

This omits both the resulting block, and the code block itself.

This should work as well when using an example block.

:exports both

Math::PI + 1
4.14159265358979

Should behave the same when within a block example.

hello = <<HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.
HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.

:exports results

This option can’t be completely supported by OrgRuby since we would have to eval the code block using :lang, so Org Babel features would have to be implemented as well.

But in case the resulting block is within the Org mode file, the code block will be omitted and only the results block would appear.

3.141592653589793

The same should happen when a block example is used instead:

any string
any string
any string
any string
any string
any string
any string
any string
any string
any string

When results are graphics…

A code block which is evaled within a Org mode buffer using Org babel features will have its results appear within another code block prepended with a #+RESULTS directive.

A results block could also not be another example block, and just consist from a link to a file. This happens when the output is a graphic for example:

  • Exports none
  • Exports code
    digraph workflow {
      a -> c;
      b -> c;
    }
        
  • Exports both
    digraph workflow {
      a -> c;
      b -> c;
    }
        

    workflow.png

  • Exports results

    workflow.png

When blocks have a name, the results should be the same

exports code

var message = "Hello world!";

console.log(message);
var message = "Hello world!";
for (var i = 0; i< 10; i++) {
  console.log(message);
}

exports none

exports both

Math::PI + 1
4.141592653589793
hello = <<HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.
HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.

exports results

3.141592653589793
any string
any string
any string
any string
any string
any string
any string
any string
any string
any string
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-block-exports-no-color.org000066400000000000000000000211401257631261400315440ustar00rootroot00000000000000#+TITLE: Support for :exports options from code blocks #+startup: showeverything According to the [[http://orgmode.org/manual/Exporting-code-blocks.html#Exporting-code-blocks][Org mode docs]], it is possible to customize whether the code block will be exported or not. * About the ~#+RESULTS:~ block Using Org Babel features, it is possible to set ~:results output~ to a code block and render the results within a ~#+RESULTS:~ code block: #+begin_src org ,#+begin_src ruby :results output :exports both puts "Hello world" ,#+end_src ,#+RESULTS: : Hello world #+end_src One thing about the ~#+RESULTS:~ code blocks, is that they exist in several forms: 1) As an accumulated group of inline examples: #+begin_src org ,#+begin_src python :results output :exports both print "like" print "this" print "etc..." ,#+end_src ,#+RESULTS: : like : this : etc... #+end_src 2) As an example code block. #+begin_src org ,#+begin_src ruby :results output :exports both 10.times {|n| puts n } ,#+end_src ,#+RESULTS: ,#+begin_example 0 1 2 3 4 5 6 7 8 9 ,#+end_example #+end_src 3) Also, in case ~:results output code~ is used, the results would be a src block of the same language as the original one. #+begin_src org ,#+begin_src ruby :results output code counter = 0 10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block puts counter # Displayed in second code block ,#+end_src ,#+RESULTS: ,#+begin_src ruby puts '1' puts '2' puts '3' puts '4' puts '5' puts '6' puts '7' puts '8' puts '9' puts '10' 10 ,#+end_src ,#+RESULTS: : 10 #+end_src * DONE Default options The default is to export only the code blocks. The following is an code block written in Emacs Lisp and its result should not be exported. #+begin_src emacs-lisp (message "hello world") #+end_src #+RESULTS: : hello world The following is a code block written in Python and its result should not be exported. #+begin_src python :results output for i in range(0,12): print "import this" #+end_src #+RESULTS: #+begin_example import this import this import this import this import this import this import this import this import this import this import this import this #+end_example * DONE :exports code Only the code would be in the output, the same as when no option is set. #+begin_src js :exports code :results output var message = "Hello world!"; console.log(message); #+end_src #+RESULTS: : Hello world! And as block example too: #+begin_src js :exports code :results output var message = "Hello world!"; for (var i = 0; i< 10; i++) { console.log(message); } #+end_src #+RESULTS: #+begin_example Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! #+end_example * DONE :exports none This omits both the resulting block, and the code block itself. #+begin_src python :results output :exports none print 1 # :P #+end_src #+RESULTS: : 1 This should work as well when using an example block. #+begin_src python :results output :exports none for i in range(0,10): print 1 # :P #+end_src #+RESULTS: #+begin_example 1 1 1 1 1 1 1 1 1 1 #+end_example * DONE :exports both #+begin_src ruby :exports both Math::PI + 1 #+end_src #+RESULTS: : 4.14159265358979 Should behave the same when within a block example. #+begin_src ruby :exports both hello = < c; b -> c; } #+end_src #+RESULTS: [[file:workflow.png]] - Exports code #+begin_src dot :exports code :results graphics :file workflow.png digraph workflow { a -> c; b -> c; } #+end_src #+RESULTS: [[file:workflow.png]] - Exports both #+begin_src dot :exports both :results graphics :file workflow.png digraph workflow { a -> c; b -> c; } #+end_src #+RESULTS: [[file:workflow.png]] - Exports results #+begin_src dot :exports results :results graphics :file workflow.png digraph workflow { a -> c; b -> c; } #+end_src #+RESULTS: [[file:workflow.png]] * When blocks have a name, the results should be the same ** exports code #+name: hello_js_exports_code_short #+begin_src js :exports code :results output var message = "Hello world!"; console.log(message); #+end_src #+RESULTS: hello_js_exports_code_short : Hello world! #+name: hello_js_exports_code_long #+begin_src js :exports code :results output var message = "Hello world!"; for (var i = 0; i< 10; i++) { console.log(message); } #+end_src #+RESULTS: hello_js_exports_code_long #+begin_example Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! #+end_example ** exports none #+name: hello_python_exports_none_short #+begin_src python :results output :exports none print 1 # :P #+end_src #+RESULTS: hello_python_exports_none_short : 1 #+name: hello_python_exports_none_long #+begin_src python :results output :exports none for i in range(0,10): print 1 # :P #+end_src #+RESULTS: hello_python_exports_none_long #+begin_example 1 1 1 1 1 1 1 1 1 1 #+end_example ** exports both #+name: hello_ruby_exports_both_short #+begin_src ruby :exports both Math::PI + 1 #+end_src #+RESULTS: hello_ruby_exports_both_short : 4.141592653589793 #+name: hello_ruby_exports_both_long #+begin_src ruby :exports both hello = <Support for :exports options from code blocks

According to the Org mode docs, it is possible to customize whether the code block will be exported or not.

About the #+RESULTS: block

Using Org Babel features, it is possible to set :results output to a code block and render the results within a #+RESULTS: code block:

#+begin_src ruby :results output :exports both
puts "Hello world"
#+end_src

#+RESULTS:
: Hello world

One thing about the #+RESULTS: code blocks, is that they exist in several forms:

  1. As an accumulated group of inline examples:
    #+begin_src python :results output :exports both
    print "like"
    print "this"
    print "etc..."
    #+end_src
    
    #+RESULTS:
    : like
    : this
    : etc...
    
  2. As an example code block.
    #+begin_src ruby :results output :exports both
    10.times {|n| puts n }
    #+end_src
    
    #+RESULTS:
    #+begin_example
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    #+end_example
    
  3. Also, in case :results output code is used, the results would be a src block of the same language as the original one.
    #+begin_src ruby :results output code
    counter = 0
    10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block
    puts counter # Displayed in second code block
    #+end_src
    
    #+RESULTS:
    #+begin_src ruby
    puts '1'
    puts '2'
    puts '3'
    puts '4'
    puts '5'
    puts '6'
    puts '7'
    puts '8'
    puts '9'
    puts '10'
    10
    #+end_src
    
    #+RESULTS:
    : 10
    

Default options

The default is to export only the code blocks.

The following is an code block written in Emacs Lisp and its result should not be exported.

(message "hello world")

The following is a code block written in Python and its result should not be exported.

for i in range(0,12):
  print "import this"

:exports code

Only the code would be in the output, the same as when no option is set.

var message = "Hello world!";

console.log(message);

And as block example too:

var message = "Hello world!";
for (var i = 0; i< 10; i++) {
  console.log(message);
}

:exports none

This omits both the resulting block, and the code block itself.

This should work as well when using an example block.

:exports both

Math::PI + 1
4.14159265358979

Should behave the same when within a block example.

hello = <<HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.
HELLO
The following is a text
that will contain at least 10 lines or more
so that when C-c C-c is pressed
and Emacs lisp
evals what is inside of the block,
enough lines would be created
such that an example block 
would appear underneath the
block that was executed.
This happens after 10 lines by default.

:exports results

This option can’t be completely supported by OrgRuby since we would have to eval the code block using :lang, so Org Babel features would have to be implemented as well.

But in case the resulting block is within the Org mode file, the code block will be omitted and only the results block would appear.

3.141592653589793

The same should happen when a block example is used instead:

any string
any string
any string
any string
any string
any string
any string
any string
any string
any string
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-block-exports-pygments.org000066400000000000000000000120431257631261400316640ustar00rootroot00000000000000#+TITLE: Support for :exports options from code blocks #+startup: showeverything According to the [[http://orgmode.org/manual/Exporting-code-blocks.html#Exporting-code-blocks][Org mode docs]], it is possible to customize whether the code block will be exported or not. * About the ~#+RESULTS:~ block Using Org Babel features, it is possible to set ~:results output~ to a code block and render the results within a ~#+RESULTS:~ code block: #+begin_src org ,#+begin_src ruby :results output :exports both puts "Hello world" ,#+end_src ,#+RESULTS: : Hello world #+end_src One thing about the ~#+RESULTS:~ code blocks, is that they exist in several forms: 1) As an accumulated group of inline examples: #+begin_src org ,#+begin_src python :results output :exports both print "like" print "this" print "etc..." ,#+end_src ,#+RESULTS: : like : this : etc... #+end_src 2) As an example code block. #+begin_src org ,#+begin_src ruby :results output :exports both 10.times {|n| puts n } ,#+end_src ,#+RESULTS: ,#+begin_example 0 1 2 3 4 5 6 7 8 9 ,#+end_example #+end_src 3) Also, in case ~:results output code~ is used, the results would be a src block of the same language as the original one. #+begin_src org ,#+begin_src ruby :results output code counter = 0 10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block puts counter # Displayed in second code block ,#+end_src ,#+RESULTS: ,#+begin_src ruby puts '1' puts '2' puts '3' puts '4' puts '5' puts '6' puts '7' puts '8' puts '9' puts '10' 10 ,#+end_src ,#+RESULTS: : 10 #+end_src * DONE Default options The default is to export only the code blocks. The following is an code block written in Emacs Lisp and its result should not be exported. #+begin_src emacs-lisp (message "hello world") #+end_src #+RESULTS: : hello world The following is a code block written in Python and its result should not be exported. #+begin_src python :results output for i in range(0,12): print "import this" #+end_src #+RESULTS: #+begin_example import this import this import this import this import this import this import this import this import this import this import this import this #+end_example * DONE :exports code Only the code would be in the output, the same as when no option is set. #+begin_src js :exports code :results output var message = "Hello world!"; console.log(message); #+end_src #+RESULTS: : Hello world! And as block example too: #+begin_src js :exports code :results output var message = "Hello world!"; for (var i = 0; i< 10; i++) { console.log(message); } #+end_src #+RESULTS: #+begin_example Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! #+end_example * DONE :exports none This omits both the resulting block, and the code block itself. #+begin_src python :results output :exports none print 1 # :P #+end_src #+RESULTS: : 1 This should work as well when using an example block. #+begin_src python :results output :exports none for i in range(0,10): print 1 # :P #+end_src #+RESULTS: #+begin_example 1 1 1 1 1 1 1 1 1 1 #+end_example * DONE :exports both #+begin_src ruby :exports both Math::PI + 1 #+end_src #+RESULTS: : 4.14159265358979 Should behave the same when within a block example. #+begin_src ruby :exports both hello = <Simple Code Syntax highlighting test
class Coderay
  class << self
    def colorize
      # Do colorizing stuff here
      heredoc = <<EOF
    Some text yay!!!
EOF
    end
  end
end

When including a file as an src code file

- This file has only a list
- Note it will end with nothing other than a list item.
- the world wants to know: Will org-ruby write the closing ul tag?

ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-coderay.org000066400000000000000000000004761257631261400266610ustar00rootroot00000000000000* Simple Code Syntax highlighting test #+BEGIN_SRC ruby class Coderay class << self def colorize # Do colorizing stuff here heredoc = <Simple Code Syntax highlighting test
class Pygments
  class << self
    def colorize
      # Do colorizing stuff here
      heredoc = <<EOF
    Some text yay!!!
EOF
    end
  end
end

Now using EXAMPLE blocks instead:

def hello()
  puts "hello"
end

Small case should work as well:

class Hello
  def say
    puts "hola"
  end
end
class Piano
  def play_note(note)
  # TODO
  end
end

When including a file as an src code file

- This file has only a list
- Note it will end with nothing other than a list item.
- the world wants to know: Will org-ruby write the closing ul tag?

ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-no-color.org000066400000000000000000000011441257631261400267540ustar00rootroot00000000000000* Simple Code Syntax highlighting test #+BEGIN_SRC ruby class Pygments class << self def colorize # Do colorizing stuff here heredoc = <Simple Code Syntax highlighting test
class Pygments
  class << self
    def colorize
      # Do colorizing stuff here
      heredoc = <<EOF
    Some text yay!!!
EOF
    end
  end
end

Now using EXAMPLE blocks instead:

def hello()
  puts "hello"
end

Small case should work as well:

class Hello
  def say
    puts "hola"
  end
end
class Piano
  def play_note(note)
  # TODO
  end
end

When including a file as an src code file

- This file has only a list
- Note it will end with nothing other than a list item.
- the world wants to know: Will org-ruby write the closing ul tag?
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/code-pygments.org000066400000000000000000000011441257631261400270720ustar00rootroot00000000000000* Simple Code Syntax highlighting test #+BEGIN_SRC ruby class Pygments class << self def colorize # Do colorizing stuff here heredoc = <Removing the prepended comma from Org mode src blocks

As mentioned in http://orgmode.org/manual/Literal-examples.html, when at the beginning of the line there is either “,*” or “,#+” this prepended comma should be removed before parsing.

(Fixes https://github.com/bdewey/org-ruby/issues/50)

Here the prepended comma will be removed.

* Hello
** Goodbye
 *** Not a headline, but prepended comma still removed.
* I am a headline

Here the prepended comma is should not be removed.

{
  "one":   1
, "two":   2
, "three": 3
, "four":  4
}

Here the prepended comma is also removed

Emacs Org mode implementation also removes it.

text = <<TEXT
#+TITLE: Prepended comma world
* Hello world
More text here
TEXT

Here the prepended comma will be remove for the Hello world headline

,  ,* Hi
,  
,  ,* This will be appended a comma
* Hello world  
,  

Here the prepended comma will be removed

#+TITLE: "Hello world"

This will be rendered as normal

,,,,,,,,,,,,,,,,,*Hello world
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/prepended-comma-coderay.org000066400000000000000000000023341257631261400310020ustar00rootroot00000000000000* Removing the prepended comma from Org mode src blocks As mentioned in , when at the beginning of the line there is either ",*" or ",#+" this prepended comma should be removed before parsing. (Fixes ) ** DONE Here the prepended comma will be removed. #+begin_src org ,* Hello ,** Goodbye , *** Not a headline, but prepended comma still removed. ,* I am a headline #+end_src ** DONE Here the prepended comma is should not be removed. #+begin_src js { "one": 1 , "two": 2 , "three": 3 , "four": 4 } #+end_src ** DONE Here the prepended comma is also removed Emacs Org mode implementation also removes it. #+begin_src ruby text = <Removing the prepended comma from Org mode src blocks

As mentioned in http://orgmode.org/manual/Literal-examples.html, when at the beginning of the line there is either “,*” or “,#+” this prepended comma should be removed before parsing.

(Fixes https://github.com/bdewey/org-ruby/issues/50)

Here the prepended comma will be removed.

* Hello
** Goodbye
 *** Not a headline, but prepended comma still removed.
* I am a headline

Here the prepended comma is should not be removed.

{
  "one":   1
, "two":   2
, "three": 3
, "four":  4
}

Here the prepended comma is also removed

Emacs Org mode implementation also removes it.

text = <<TEXT
#+TITLE: Prepended comma world
* Hello world
More text here
TEXT

Here the prepended comma will be remove for the Hello world headline

,  ,* Hi
,  
,  ,* This will be appended a comma
* Hello world  
,  

Here the prepended comma will be removed

#+TITLE: "Hello world"

This will be rendered as normal

,,,,,,,,,,,,,,,,,*Hello world
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/prepended-comma-no-color.org000066400000000000000000000023341257631261400311040ustar00rootroot00000000000000* Removing the prepended comma from Org mode src blocks As mentioned in , when at the beginning of the line there is either ",*" or ",#+" this prepended comma should be removed before parsing. (Fixes ) ** DONE Here the prepended comma will be removed. #+begin_src org ,* Hello ,** Goodbye , *** Not a headline, but prepended comma still removed. ,* I am a headline #+end_src ** DONE Here the prepended comma is should not be removed. #+begin_src js { "one": 1 , "two": 2 , "three": 3 , "four": 4 } #+end_src ** DONE Here the prepended comma is also removed Emacs Org mode implementation also removes it. #+begin_src ruby text = <Removing the prepended comma from Org mode src blocks

As mentioned in http://orgmode.org/manual/Literal-examples.html, when at the beginning of the line there is either “,*” or “,#+” this prepended comma should be removed before parsing.

(Fixes https://github.com/bdewey/org-ruby/issues/50)

Here the prepended comma will be removed.

* Hello
** Goodbye
 *** Not a headline, but prepended comma still removed.
* I am a headline

Here the prepended comma is should not be removed.

{
  "one":   1
, "two":   2
, "three": 3
, "four":  4
}

Here the prepended comma is also removed

Emacs Org mode implementation also removes it.

text = <<TEXT
#+TITLE: Prepended comma world
* Hello world
More text here
TEXT

Here the prepended comma will be remove for the Hello world headline

,  ,* Hi
,  
,  ,* This will be appended a comma
* Hello world  
,  

Here the prepended comma will be removed

#+TITLE: "Hello world"

This will be rendered as normal

,,,,,,,,,,,,,,,,,*Hello world
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/prepended-comma-pygments.org000066400000000000000000000023341257631261400312220ustar00rootroot00000000000000* Removing the prepended comma from Org mode src blocks As mentioned in , when at the beginning of the line there is either ",*" or ",#+" this prepended comma should be removed before parsing. (Fixes ) ** DONE Here the prepended comma will be removed. #+begin_src org ,* Hello ,** Goodbye , *** Not a headline, but prepended comma still removed. ,* I am a headline #+end_src ** DONE Here the prepended comma is should not be removed. #+begin_src js { "one": 1 , "two": 2 , "three": 3 , "four": 4 } #+end_src ** DONE Here the prepended comma is also removed Emacs Org mode implementation also removes it. #+begin_src ruby text = <begin src in lists should work
  • Foo
    class Hello
      def say
        puts 'cheers'
      end
    end
        
  • Bar
    puts "This should not get lumped into the above line Example"
        

    A paragraph should go here.

    • A sublist goes here with another example
      echo "Hello"
              

      And this is a paragraph

  • Hello
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/src-code-list-coderay.org000066400000000000000000000006761257631261400304210ustar00rootroot00000000000000* begin src in lists should work - Foo #+begin_src ruby class Hello def say puts 'cheers' end end #+end_src - Bar #+begin_src ruby puts "This should not get lumped into the above line Example" #+end_src A paragraph should go here. + A sublist goes here with another example #+begin_src sh echo "Hello" #+end_src And this is a paragraph - Hello ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/src-code-list-no-color.html000066400000000000000000000010561257631261400306710ustar00rootroot00000000000000

begin src in lists should work

  • Foo
    class Hello
      def say
        puts 'cheers'
      end
    end
        
  • Bar
    puts "This should not get lumped into the above line Example"
        

    A paragraph should go here.

    • A sublist goes here with another example
      echo "Hello"
              

      And this is a paragraph

  • Hello
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/src-code-list-no-color.org000066400000000000000000000006761257631261400305230ustar00rootroot00000000000000* begin src in lists should work - Foo #+begin_src ruby class Hello def say puts 'cheers' end end #+end_src - Bar #+begin_src ruby puts "This should not get lumped into the above line Example" #+end_src A paragraph should go here. + A sublist goes here with another example #+begin_src sh echo "Hello" #+end_src And this is a paragraph - Hello ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/src-code-list-pygments.html000066400000000000000000000014701257631261400310070ustar00rootroot00000000000000

begin src in lists should work

  • Foo
    class Hello
      def say
        puts 'cheers'
      end
    end
    
  • Bar
    puts "This should not get lumped into the above line Example"
    

    A paragraph should go here.

    • A sublist goes here with another example
      echo "Hello"
      

      And this is a paragraph

  • Hello
ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/src-code-list-pygments.org000066400000000000000000000006761257631261400306410ustar00rootroot00000000000000* begin src in lists should work - Foo #+begin_src ruby class Hello def say puts 'cheers' end end #+end_src - Bar #+begin_src ruby puts "This should not get lumped into the above line Example" #+end_src A paragraph should go here. + A sublist goes here with another example #+begin_src sh echo "Hello" #+end_src And this is a paragraph - Hello ruby-org-0.9.12/spec/html_code_syntax_highlight_examples/workflow.png000066400000000000000000000145561257631261400261760ustar00rootroot00000000000000‰PNG  IHDR³›)모5IDATxí] ´MUþ•Ê¥²h!e&!J†H£¡ÉÂZ‘©²’YƒRª…´Š"Ò{I„ˆÌó”)J¢%šwÿ÷×yï¾ûîôî½çîsö9{­óÞ½gØÃ·ÿ»Ï¿÷þÿïÏ¥”J#?ù¸5¹¹ ­Üß¿>Dçø ø˜‚€/̦ô¤ßdöeÀ 3kKǧ;vȱwï^:t臦ӧOÓÙ³gé·ß~£?ÿü“òäÉ#GÞ¼y©páÂT¼xq9.¿ürªP¡U©R…*V¬(÷hkË 6 ÿ\¼š¡RÕÜe˖ɱråJ‚Ð"]|ñÅT¶lY‚`BH‹+F ÌÞóÎ;O„‚ ?qâD†àþYz ~aÞ¹s§ªZµªÃSO=¥x¥!KÎnù²oß>u×]w‰NݵkWõ믿º¢ê>þÙº)>až8q¢Ê—/ŸºþúëÕ7ß|“-W7ž˜1c†èù˜¬nß¾ÝÑMðñÙ=9f^êQ˜ÔåÊ•K=ñÄ ¯9“tO^6}zÁ‚ŽkšÄ.‰]˜±œÕ¶m[uþùç«iÓ¦EÌÕÍÑÎ:ÈŠÌ”)SÓÿ¨]›0cDh×®ŒXnœ(E…!Ä ?þ¸:çœsTzzzˆ«©=åãÞ± 3T ŒÈ .Œ)WSnêÙ³§ºà‚ Ô’%K´6ÉÇ?&ü£ ó{ï½'3}ü÷ZˆزeKYf;-Í÷ñÿÈÂüí·ß*¶¥P=zôÐÒ‘N(ô矖5ôÛn»MA¸S™|ü•Êþ‘…ùÎ;ï» §îæ¥J°ØxIôçÉ“'§ªH)ÇÇÿ?¸cÄ?¼0³©¦¨óçÏOi:µ°.]º¨’%K¦lsÈÇ?«$Ä€xa†…Ù­·Þš5Gûþûïe·óµ×^K >þYaŽÿРë+˜nΙ3'kŽÿ‹@¶Á¶Ýø³¿ØÜ°…ímÍIQð-̃Vìõᣡœ’Ƚlô/?òmÛ¶%’MÔguâÿÕW_©öíÛ;r+ þi!½³?ûì3jÖ¬™¸!¹Î½ÂÆ ÃC¦H‘"|ìL:ñg^êÕ«—Í‹;ïhøgføÒÁå¨nݺqjêƒl“BuêÔ¡Õ«WÛÖD'à_J$´×I)þÙ¼³÷ìÙ#ΡիW×Þ8ª®]»–øµ.?®{ï½W{€ oqÛV'áFÂyíåõ^jÕª]qŶµ=–Œ#áŸM˜á~ŽtÙe—Å’·m÷Œ=šfÍšEl Bß}÷ÝtÓMľmÔ½{wÛÊŒ%cöN¡ü1–[ãºÇ)ø£òsçÎ¥‘#GŠÇ<¼êŸ{î9bkBªU«V\mKÆC‘ðϦfüôÓORæE]”Œ²ã΃—À¨råÊòªÃhP­Z5âÕ•¸óKÖƒ E°0JVžùXyëÆubC+úüóÏE¨¡ÇƒË„íU«›òÏ‘ðÏ62³ ”T=.„l%åµý¿À¥K—’Uöª È«NW}¬r‹U/ë\2ÿ[yëÆmEƒ•؃®½öZQûðö¸ä’K¬K)ý ÿl#3fëHv¾Jci=aÖ¯_O½{÷¦]»vûÛFÄò¨­÷ #-Œì(ÈÊ[7þ¡Ú†É/˜§t¥Høg™™ëBê‰ÉHW2dˆ0AG%»5éªJ–r‹…Q– Iúbå­ÿPÍÛVt’éDÂ?äÈŒµFÐgéJûöí£gžy†î¿ÿ~dÔà £2ê†&k„Â÷d'ŒÌºñ×&L±d ê4])þÙ„•Äâ´Ý‘ÀÀD‰Ù‡DO^±b…Pnar„kÌVéqÛ®^Œ·šÛ áŒuãoµíÔ©SÖG:vì˜è˯¾újƹTˆŠ¨½ÕE‹Év¦N6¢|PåÎ[•)SF?^}ðÁâíÒ¨Q#Åúd¨jÛ~nøðኗ,m§÷Ò?h#€?¸Púöí«¨Ú´i£¶lÙb;Æ‘ ˆ‚hÛ ¡³î¦xò)oÛ¯Á0;0é俀C)L@{ì±À*ÙòÙ)ø£q¼Šä.‘ð-ÌhÄ+¯¼"þoðvð“RcÇŽ8æØn:eñWbÅÉÇ?"R9fd5£I“&¢K²ávÊY~"6'‹˜4mÚTÚ…hNM>þa{&çÂŒ¬°C5jÔ(¡}åhŽ'çÛüÿ/ |‚ö`‡ýû¢Ý®ýºÈ.ˆO˜­¬ØñUØóaC¦J¶5µ.¹â?êÏ03Ô ·Mn}ü³ˆYbÂŒ¬×o„ ”‰N`Ôg «,¥8íËÆ3☠”;8­Š1×ÇÇ?ªÄ…ÙÊ 1õ[áÈÁ Á$׬Yc]ÖþFJP' aW³fÍšF16ùø«ä ³%­&›ì€*Bƒ¥¼aÆ©­[·Z·¤ì?âû!˜%¢H!J+Ô!,·™LšîaüÓl8ÖS§N¥™3g¶ÃݔԎ#Ùî7ƒPl;<#`È×xbâX%d>ÕFåºÊóþö‚·:‘‡bqN„ Ä.`î)\¸°Ð ðÚµ¸ ÁÇ ÃÃ5¾yòä!_,÷3O4á1 œ*™Í^¼¶á½ÍŽôå—_orÜÑñ£ÁÁ1þˆ7{¬ªxò0þp=Â?Ùø3O±µŸp®°:—jüS#ÌÁAæI˜01ã$á`C&:r䈀|¸ï¼ÝLðâ._¾<]}õÕÄ1üˆ½d$æð áóôy0‡„ãˆÓu×]'Ø'  J`ªX±¢Œõs¸–òú)ñæ…Œ¸àG°FbŒ"('c¤A Fp¶æË–»WQëÖ­‰utðl7xü~ìcÆŒ!8 cdLÉÀ?0¿v–0'£ñx¥²A”èãlc‘Œ,Éêæ)Ž dL»þoHzHïl7·¼Ë[&›6mrsS’^wÞµ%G}úôIzÞNÈÐÖÕ 8(xiNg5S6Ô·+¯¼Ræìþå˜z%±"æÌ8O?ý4}òÉ'¶r)[e¹á?û¬Øm„»ÏMç?ýôSBˆ9˜¾z5oh®cM3V÷È›#3œãù‰ŠÁ,L(3œÐ»áüÇ,T^•ÑOž™Ñx<}^ô¤$ïŽÌh>Èb˜½”˜`œNž<ù$.û;cÆ ¡UxòÉ']VóäW×8ïìœBôè£3åÓË/¿œÓGµßž æñC"àx=y^˜áä oåÑ£GÇäv•<À"F÷ vñ“ÇufKÀž7üŽ;ÖžÝÀòÃûºuëÒÛo¿í†*Û]Goë̺ùóç'&I'øÉq˜2ë´£ÿ¿óÎ;Äq¼EÍptESX9O¯fâÌdäıň\lNN`Ú,W®Á§‘¹°\ÕTÖÍ™-´A þ5i!\ÒÖy'þóÍ7å 2xð`'VO[ü‘9z7Œxnzƒ@›ŠþȈ2H‡ "ÞÌ |ubzýõ×eM|À€N¬žÖ:ù#süN^%pãªK¼v~õGæ`tA”‚ŽL%k¸Á×u~;v¬Xùõïß_g5[¶ç7MBõL»ví$´Dàf¼” "<9ìNÛ¶m&„²À.Â7€ø°oß¾BÕkw\™?ªø)éé銉Ë%–!“—+^‹–ïÜÉ q¶íL¼ÞQÇkQ@ÂÏq؉]ngÙ.Î;Íhò±DF—ÆK ›FI%ބ𑂠UÓ®´gÏ¡âÅê \»š7o.ñG9+8‰]upc¾¾šÔkˆ„Ý”ƒÂÓþýûEG d„™€°Ù™vïÞ-? ”a©ˆg8yòd‰¤åu¾épØû€ ˜öK•*%f¡°ubë6—cd¶3!žap²ê‚—[n¹…êÕ«çš­÷à¶ØõÝæd­X„Öhp)ã#–îðê·+±Î*o„pùC¨a² ¡Æhí§L|aÎÄBB$À*R‚ ïÚµ+Ò- ]ƒç8¢Ì†K`ó,P €Dº-[¶l¸ÛˆCP˜BMš4I±nëÈ.c[±Û”bû Å6ÕŠIëÛŽ¬kŠ+åmaƈÇt\âEÂ0Šýþ[Å¥¸â+ŽWR{h+^Q¼¢/^_Fæ<å]aÞ¹s§âp¼" p‹â•Wv+¯K+ö@ºk×®Š=¸]ÙŽ$TÚ›Âþ{-aŽÀ£²¬G³ñ“éÍO3ÚÐÌò×\s µoß^Xñ³¾“¼ñ ÜÕ«W"u¨X¡¼f AÂlC#0Á#<0¿ôjZ¿~=Ýpà ô6Ç>;˜¡É\a^¾|95hÐ@&|·ß~»¡ý{³xCE)Ì`ÉlÖ¬Y6þ ƒú-®¦€l±H‘"d*‹¨q _:Œ>ˆ\ꧬ`Y®N:Bï•õŠߌóΆ¾ ÆÚªîÄž ôÑGIlð_`U>„:pS®‰É¸‘îÿHàeÓ™@EЦMb›i ø¡FXPèL`üw[ÀûXñ2N˜HI'q ¼ªÙBî¹çfºôë×Oø”Ù) Ö¾±å>Ð"XÙR€ÆLS3Ô 1ótÅÿ`çSÚ²e 5mÚ4£kkÔ¨!ÂŒÀ™:p±0ÒY;Ê6ndÆlIç«tëÖ­"0ÁA|t 2pfa„ï&%ã„1I°m«+<# ›^êªBØr‹…QØ›\zÁ8aƨÃt´råJm]‚• $öhÉR¼-fΜ™å\ª¿€¡ Ës&&ãtft6°1À¬DZú ÖzXÃN$¬õZµjEˆºŠ-ö´´4-uB¡  ð12™h±½hÑ"1È×ÉF²M,γp µÎéLÇW¼di*½—™Æù,0B2ÈtV4fÌ­ƒÐÉ“'…ÙKb:hua5‡·³ 鬊]e›i5‡m[¬ëN˜0àm¢3ayP· £ýãǧ#GŽPïÞ½uÂakÙÆºMa$bBªY³&±ÿŸ­ :=sl’€?ºsçÎ4jÔ(§W7Þú™92 æ=š˜–Þÿýx2â¹nݺÉDtàÀF´'l#tNHRQ6{U(6î1††+§˜7N1#¿âÕœ>ê¶ûͧ8sæŒâ­důYuôèQ·uPBõ;w®b»5tèЄòqÉÃf®f¿†0ñ}3Ì/±þ¬Ëf#¸^v~_±b…xÚÀr‰"í,Ê)y›«3"ŒzL$HÇŽ“ ƒ^6î3va;ݸqczã7Œk_¸·®¡°%F”S,Û!èͺuëÂÝêêó/½ô[ÜzØm„ù©g’Kô¡¤U“—©T“&MD—9r¤…• ó69•v!€“ùÀP æõV¡}­_¿¾ëɹ¾A{J–,©V¯^ªÉ^8çMa¶z–_…=3~0…"Nˆ›êÏ¡eé­{÷î o'o 3:qýxÛ[˜2Á ŒúAdvanced Lists

org-ruby supports the following list features of org-mode:

Nested lists

  • You can have nested lists
  • This is first-level
    • This is a nested item
    • This is another nested item
  • Back to the first level
  • Another first level item
    1. This is a numbered list nested within the unordered list
    2. This is another numbered item

Note the list ends just some more text. Make sure both list blocks are closed.

Multi-paragraph list items

This list will end with the end-of-file. Make sure all blocks are closed.

  • This is a list item
  • This list item has multiple paragraphs.

    This is paragraph two.

    And paragraph three.

  • Back to a list item.
    • Nested, just for grins!
    • woo hoo!

Hyphen, Plus and Asterisk can be used to create lists

  • One
    • uno
      • ichi
    • uno
  • Two
    • dos
      • ni
      • ni
  • Three
  • Four
ruby-org-0.9.12/spec/html_examples/advanced-lists.org000066400000000000000000000015671257631261400225770ustar00rootroot00000000000000Advanced Lists =org-ruby= supports the following list features of =org-mode=: * Nested lists - You can have nested lists - This is first-level - This is a nested item - This is another nested item - Back to the first level - Another first level item 1. This is a numbered list nested within the unordered list 2. This is another numbered item Note the list ends just some more text. Make sure both list blocks are closed. * Multi-paragraph list items This list will end with the end-of-file. Make sure all blocks are closed. - This is a list item - This list item has multiple paragraphs. This is paragraph two. And paragraph three. - Back to a list item. - Nested, just for grins! - woo hoo! * Hyphen, Plus and Asterisk can be used to create lists - One * uno + ichi * uno - Two + dos * ni * ni - Three - Four ruby-org-0.9.12/spec/html_examples/block_code.html000066400000000000000000000012231257631261400221240ustar00rootroot00000000000000

Block Code

I need to get block code examples working. In orgmode, they look like this:


def initialize(output)
  @output = output
  @buffer = ""
  @output_type = :start
  @list_indent_stack = []
  @paragraph_modifier = nil

  @logger = Logger.new(STDERR)
  @logger.level = Logger::WARN
end

And now I should be back to normal text.

Putting in another paragraph for good measure.

Code should also get cancelled by a list, thus:

This is my code!

Another line!
  • My list should cancel this.
  • Another list line.
ruby-org-0.9.12/spec/html_examples/block_code.org000066400000000000000000000011521257631261400217500ustar00rootroot00000000000000* Block Code I need to get block code examples working. In =orgmode=, they look like this: #+BEGIN_EXAMPLE def initialize(output) @output = output @buffer = "" @output_type = :start @list_indent_stack = [] @paragraph_modifier = nil @logger = Logger.new(STDERR) @logger.level = Logger::WARN end #+END_EXAMPLE And now I should be back to normal text. Putting in another paragraph for good measure. Code should also get cancelled by a list, thus: #+BEGIN_EXAMPLE This is my code! Another line! #+END_EXAMPLE - My list should cancel this. - Another list line. ruby-org-0.9.12/spec/html_examples/blockcomment.html000066400000000000000000000001401257631261400225120ustar00rootroot00000000000000

BLOCKCOMMENT

Testing that the next part is ignored

And now back to normal!

ruby-org-0.9.12/spec/html_examples/blockcomment.org000066400000000000000000000002361257631261400223430ustar00rootroot00000000000000BLOCKCOMMENT Testing that the next part is ignored #+BEGIN_COMMENT /Foo/ #+BEGIN_SRC c++ int main() { } #+END_SRC #+END_COMMENT And now back to normal! ruby-org-0.9.12/spec/html_examples/blockquote.html000066400000000000000000000003031257631261400222060ustar00rootroot00000000000000

BLOCKQUOTE

Testing that I can have block quotes:

Example:

This is blockquote text.

And now I’m back to normal text!

ruby-org-0.9.12/spec/html_examples/blockquote.org000066400000000000000000000002261257631261400220350ustar00rootroot00000000000000BLOCKQUOTE Testing that I can have block quotes: #+BEGIN_QUOTE /Example:/ This is blockquote text. #+END_QUOTE And now I'm back to normal text! ruby-org-0.9.12/spec/html_examples/center.html000066400000000000000000000001761257631261400213260ustar00rootroot00000000000000

Fou

not center

center

not center, again

ruby-org-0.9.12/spec/html_examples/center.org000066400000000000000000000001161257631261400211430ustar00rootroot00000000000000#+TITLE: Fou not center #+BEGIN_CENTER center #+END_CENTER not center, again ruby-org-0.9.12/spec/html_examples/code-block-lists.html000066400000000000000000000023201257631261400231750ustar00rootroot00000000000000

Code blocks in lists

No spaces in code block

- List starts
 + Block without indentation
   #+begin_example
puts "test"
   #+end_example
- List continues here
 + and finished here
  • List starts
    • Block without indentation
      puts "test"
              
  • List continues here
    • and finished here

Code block indented

- List starts
 + Block without indentation
   #+begin_example ruby
  puts "test"
   #+end_example
- List continues here
 + and finished here
  • List starts
    • Block without indentation
      puts "test"
              
  • List continues here
    • and finished here

Indentation level in example block

- Indentation of a begin_example code block
 #+begin_example
   (+ 3 5)
 #+end_example

  • Indentation of a begin_example code block
    (+ 3 5)
        
ruby-org-0.9.12/spec/html_examples/code-block-lists.org000066400000000000000000000015611257631261400230260ustar00rootroot00000000000000* Code blocks in lists ** No spaces in code block : - List starts : + Block without indentation : #+begin_example : puts "test" : #+end_example : - List continues here : + and finished here - List starts + Block without indentation #+begin_example puts "test" #+end_example - List continues here + and finished here ** Code block indented : - List starts : + Block without indentation : #+begin_example ruby : puts "test" : #+end_example : - List continues here : + and finished here - List starts + Block without indentation #+begin_example puts "test" #+end_example - List continues here + and finished here ** Indentation level in example block : - Indentation of a begin_example code block : #+begin_example : (+ 3 5) : #+end_example : - Indentation of a begin_example code block #+begin_example (+ 3 5) #+end_example ruby-org-0.9.12/spec/html_examples/code-comment.html000066400000000000000000000012101257631261400224060ustar00rootroot00000000000000

Code Comment

I need to be able to export things that look like org-mode comments inside of code blocks, like this:

#+TITLE:     orgmode_parser.org
#+AUTHOR:    
#+EMAIL:     brian@BRIAN-DESK
#+DATE:      2009-12-29 Tue
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
ruby-org-0.9.12/spec/html_examples/code-comment.org000066400000000000000000000011771257631261400222450ustar00rootroot00000000000000* Code Comment I need to be able to export things that look like org-mode comments inside of code blocks, like this: #+BEGIN_EXAMPLE #+TITLE: orgmode_parser.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+END_EXAMPLE ruby-org-0.9.12/spec/html_examples/code-lists.html000066400000000000000000000041521257631261400221120ustar00rootroot00000000000000

normal list should work

  • one text in the same line

    This is a paragraph

    • A sublist
      • Another sublist

        Sublist paragraph

    • 2nd sublist
      • 2nd sublist item

        Paragraph from 2nd sublist

  • two
    1. a new list

      paragraph

    2. another sublist
  • final list

paragraphs in lists should work

  • Foo
    • How does this work?

      uno dos tres

    • Should not this be a paragraph?
  • Bar

begin example in lists should work

  • Foo
    class Hello
      def say
        puts 'cheers'
      end
    end
        
  • Bar
    This gets lumped in to the above line "Example"
        
  • Hello

begin quote in lists should work

  • Example
    • Uno Lorem

      A quote!!!

      dolor

    • Dos

tables in lists should work

  • Example
    • Table

      This table:

      ab
      01
      12
  • After the table

    The table should be above

definition lists should work

  • Example
    Hello
    Hola Paragrap continues here

    Cuando me desperte, el dinosaurio estaba alli.

    Dog
    Perro Paragraph
    • Last sublist
  • Another list
    • with a sublist
ruby-org-0.9.12/spec/html_examples/code-lists.org000066400000000000000000000023231257631261400217330ustar00rootroot00000000000000* normal list should work - one text in the same line This is a paragraph + A sublist - Another sublist Sublist paragraph + 2nd sublist - 2nd sublist item Paragraph from 2nd sublist - two 1. a new list paragraph 2. another sublist - final list * paragraphs in lists should work - Foo + How does this work? uno dos tres + Should not this be a paragraph? - Bar * begin example in lists should work - Foo #+begin_example class Hello def say puts 'cheers' end end #+end_example - Bar #+begin_example This gets lumped in to the above line "Example" #+end_example - Hello * begin quote in lists should work - Example + Uno Lorem #+begin_quote A quote!!! #+end_quote dolor + Dos * tables in lists should work - Example + Table This table: | a | b | | 0 | 1 | | 1 | 2 | - After the table The table should be above * definition lists should work - Example + Hello :: Hola Paragrap continues here #+begin_quote Cuando me desperte, el dinosaurio estaba alli. #+end_quote + Dog :: Perro Paragraph + Last sublist - Another list + with a sublist ruby-org-0.9.12/spec/html_examples/comment-trees.html000066400000000000000000000002261257631261400226240ustar00rootroot00000000000000

This headline is in the output

This is in the output

Yet, this is in the output

and this is also part of the output

ruby-org-0.9.12/spec/html_examples/comment-trees.org000066400000000000000000000006001257631261400224430ustar00rootroot00000000000000* This headline is in the output * COMMENT Commented headline should not be in the output This should not be in the output either. ** This should not be in the output. *** Neither this **** nor this ** Not in the output * This is in the output ** COMMENT But this is not This is not in the output *** Neither is this ** Yet, this is in the output and this is also part of the output ruby-org-0.9.12/spec/html_examples/custom-seq-todo.html000066400000000000000000000020701257631261400231040ustar00rootroot00000000000000

custom-todo.org

I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let’s make sure all of these are recognized (and therefore NOT exported.)

TODO Sample

  • State “CANCELED” from “INPROGRESS” [2009-12-29 Tue 22:26]
    I gave up.
  • State “WAITING” from “” [2009-12-29 Tue 22:25]
    huh?

INPROGRESS this one’s in progress

WAITING who am I waiting on?

DONE Finished this one!

CANCELED I gave up here.

DONT be fooled by just a random word in all caps.

todo <== this word doesn’t match because the case doesn’t match.

TODOX

don’t be fooled by the initial substring above!

ruby-org-0.9.12/spec/html_examples/custom-seq-todo.org000066400000000000000000000014731257631261400227350ustar00rootroot00000000000000#+TITLE: custom-todo.org #+DESCRIPTION: Makes sure I can handle custom todo entries #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+OPTIONS: todo:t I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) * TODO Sample - State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. - State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? * INPROGRESS this one's in progress * WAITING who am I waiting on? * DONE Finished this one! * CANCELED I gave up here. * DONT be fooled by just a random word in all caps. * todo <== this word doesn't match because the case doesn't match. * TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/html_examples/custom-todo.html000066400000000000000000000020701257631261400223160ustar00rootroot00000000000000

custom-todo.org

I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let’s make sure all of these are recognized (and therefore NOT exported.)

TODO Sample

  • State “CANCELED” from “INPROGRESS” [2009-12-29 Tue 22:26]
    I gave up.
  • State “WAITING” from “” [2009-12-29 Tue 22:25]
    huh?

INPROGRESS this one’s in progress

WAITING who am I waiting on?

DONE Finished this one!

CANCELED I gave up here.

DONT be fooled by just a random word in all caps.

todo <== this word doesn’t match because the case doesn’t match.

TODOX

don’t be fooled by the initial substring above!

ruby-org-0.9.12/spec/html_examples/custom-todo.org000066400000000000000000000014671257631261400221520ustar00rootroot00000000000000#+TITLE: custom-todo.org #+DESCRIPTION: Makes sure I can handle custom todo entries #+TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+OPTIONS: todo:t I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) * TODO Sample - State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. - State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? * INPROGRESS this one's in progress * WAITING who am I waiting on? * DONE Finished this one! * CANCELED I gave up here. * DONT be fooled by just a random word in all caps. * todo <== this word doesn't match because the case doesn't match. * TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/html_examples/custom-typ-todo.html000066400000000000000000000020701257631261400231300ustar00rootroot00000000000000

custom-todo.org

I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let’s make sure all of these are recognized (and therefore NOT exported.)

TODO Sample

  • State “CANCELED” from “INPROGRESS” [2009-12-29 Tue 22:26]
    I gave up.
  • State “WAITING” from “” [2009-12-29 Tue 22:25]
    huh?

INPROGRESS this one’s in progress

WAITING who am I waiting on?

DONE Finished this one!

CANCELED I gave up here.

DONT be fooled by just a random word in all caps.

todo <== this word doesn’t match because the case doesn’t match.

TODOX

don’t be fooled by the initial substring above!

ruby-org-0.9.12/spec/html_examples/custom-typ-todo.org000066400000000000000000000014731257631261400227610ustar00rootroot00000000000000#+TITLE: custom-todo.org #+DESCRIPTION: Makes sure I can handle custom todo entries #+TYP_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+OPTIONS: todo:t I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) * TODO Sample - State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. - State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? * INPROGRESS this one's in progress * WAITING who am I waiting on? * DONE Finished this one! * CANCELED I gave up here. * DONT be fooled by just a random word in all caps. * todo <== this word doesn't match because the case doesn't match. * TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/html_examples/deflist.html000066400000000000000000000054221257631261400214770ustar00rootroot00000000000000

Hallo

a
hello
b
world

Text

Asterisk can be used for lists

One
The first number.
Two
The second number.
Three
The second number.

Corner cases of definition lists

The following examples show how org-ruby behave when handling some cases of definition lists. (Many thanks to vonavi for his contributions here)

Definition List Items

  • Regular list
    Key
    Value (k1)
    Key
    Value (k2)
    Key
    Value (k3)
  • Semicolon as part of key
    K::e::y
    Value (k1)
    K::e::y
    Value (k2)
  • Paragraph break after key
    Key
    Value (k1)
    Key
    Value (k2)
  • Many semicolons in same line
    Key :: Value
    Still value (k1)
    Key :: Value
    Still value (k2)
  • Semicolon placement cases
    • Case 1
      Key ::MoreKey
      Value (k1)
    • Case 2
      Key:: MoreKey
      Value (k2)
    • Case 3
      :: Key
      Value (k3)

Not Definition List Items

The following cases will not be considered as definition lists but just regular lists.

  • Key:: Value (n1)
  • Key ::Value (n2)
  • Key::Value (n3)
  • Key:: Value (n4)
  • Key :: Value (n5)

Definition List Item without Definition

??? will be shown in this case

  • Example list
    Key :: Value
    Still value (k1) Paragraph :: with :: no value
    Key :: Value :: Still value (k1)
    Paragraph :: with :: no value ::
    ???
    Paragraph :: with :: no value

Definition List with markup inline

Description
bold
Description
italic
Description
code
Description
verbatim
Description
underline
Description
strikethrough
More than 2 cases
bold, italic, code, verbatim, underline, strikethrough.
ruby-org-0.9.12/spec/html_examples/deflist.org000066400000000000000000000032351257631261400213220ustar00rootroot00000000000000#+TITLE: Hallo - a :: hello - b :: world Text * Asterisk can be used for lists * One :: The first number. * Two :: The second number. * Three :: The second number. * Corner cases of definition lists The following examples show how org-ruby behave when handling some cases of definition lists. (Many thanks to [[https://github.com/vonavi][vonavi]] for his contributions here) ** Definition List Items - Regular list + Key :: Value (k1) + Key :: Value (k2) + Key :: Value (k3) - Semicolon as part of key - K::e::y :: Value (k1) - K::e::y :: Value (k2) - Paragraph break after key + Key :: Value (k1) + Key :: Value (k2) - Many semicolons in same line + Key :: Value :: Still value (k1) + Key :: Value :: Still value (k2) - Semicolon placement cases + Case 1 * Key ::MoreKey :: Value (k1) + Case 2 * Key:: MoreKey :: Value (k2) + Case 3 * :: Key :: Value (k3) ** Not Definition List Items The following cases will not be considered as definition lists but just regular lists. - Key:: Value (n1) - Key ::Value (n2) - Key::Value (n3) - Key:: Value (n4) - Key :: Value (n5) ** Definition List Item without Definition ??? will be shown in this case - Example list + Key :: Value :: Still value (k1) Paragraph :: with :: no value + Key :: Value :: Still value (k1) :: Paragraph :: with :: no value :: + :: Paragraph :: with :: no value ** Definition List with markup inline - Description :: *bold* - Description :: /italic/ - Description :: =code= - Description :: ~verbatim~ - Description :: _underline_ - Description :: +strikethrough+ - More than 2 cases :: *bold*, /italic/, =code=, ~verbatim~, _underline_, +strikethrough+. ruby-org-0.9.12/spec/html_examples/emphasis.html000066400000000000000000001473611257631261400216670ustar00rootroot00000000000000

Inline Formatting test for emphasis

Simple feature test

bold

italic

code

verbatim

underline

strikethrough

http://www.bing.com

http://www.google.com

http://www.gmail.com

helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com

All together in one line

bold italic code verbatim underline strikethrough http://www.bing.com http://www.google.com http://www.gmail.com helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

Within code test

emphasis_tests = [
"*bold*",
"/italic/",
"=code=",
"~verbatim~",
"_underline_ ",
"+strikethrough+",
"[[http://www.bing.com]]",
"[[http://www.google.com]]",
"[[http://www.xkcd.com][helpful text link]]",
"[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]",
"[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]",
"<http://www.google.com>",
]

all = emphasis_tests.map do |a|
  emphasis_tests.map do |b|
    [b, ' ', a, ' ', b, "\n\n"].join('')
  end
end

all.each {|e| puts e}

Mixed together test

emphasis_tests = ["*","/","=","~","_","+"]

all = emphasis_tests.map do |a|
  emphasis_tests.map do |b|
    [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''),
     [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten
  end
end

all.each {|e| puts e}

Answer: *42 *

Answer: *42*

*Answer: 42 *

Answer: /42/

*Answer: 42 *

Answer: =42=

*Answer: 42 *

Answer: ~42~

*Answer: 42 *

Answer: _42_

*Answer: 42 *

Answer: +42+

/Answer: 42 /

Answer: *42*

Answer: /42 /

Answer: /42/

/Answer: 42 /

Answer: =42=

/Answer: 42 /

Answer: ~42~

/Answer: 42 /

Answer: _42_

/Answer: 42 /

Answer: +42+

=Answer: 42 =

Answer: *42*

=Answer: 42 =

Answer: /42/

Answer: =42 =

Answer: =42=

=Answer: 42 =

Answer: ~42~

=Answer: 42 =

Answer: _42_

=Answer: 42 =

Answer: +42+

~Answer: 42 ~

Answer: *42*

~Answer: 42 ~

Answer: /42/

~Answer: 42 ~

Answer: =42=

Answer: ~42 ~

Answer: ~42~

~Answer: 42 ~

Answer: _42_

~Answer: 42 ~

Answer: +42+

_Answer: 42 _

Answer: *42*

_Answer: 42 _

Answer: /42/

_Answer: 42 _

Answer: =42=

_Answer: 42 _

Answer: ~42~

Answer: _42 _

Answer: _42_

_Answer: 42 _

Answer: +42+

+Answer: 42 +

Answer: *42*

+Answer: 42 +

Answer: /42/

+Answer: 42 +

Answer: =42=

+Answer: 42 +

Answer: ~42~

+Answer: 42 +

Answer: _42_

Answer: +42 +

Answer: +42+

Multiline support test :: one line

emphasis_tests = ["*","/","=","~","_","+"]

all = emphasis_tests.map do |a|
  emphasis_tests.map do |b|
    [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('')
  end
end

all.each {|e| puts e}

Starting the line here *and continuing here to close*

Starting the line here /and continuing here to close/

Starting the line here =and continuing here to close=

Starting the line here ~and continuing here to close~

Starting the line here _and continuing here to close_

Starting the line here +and continuing here to close+

Starting the line here *and continuing here to close*

Starting the line here /and continuing here to close/

Starting the line here =and continuing here to close=

Starting the line here ~and continuing here to close~

Starting the line here _and continuing here to close_

Starting the line here +and continuing here to close+

Starting the line here *and continuing here to close*

Starting the line here /and continuing here to close/

Starting the line here =and continuing here to close=

Starting the line here ~and continuing here to close~

Starting the line here _and continuing here to close_

Starting the line here +and continuing here to close+

Starting the line here *and continuing here to close*

Starting the line here /and continuing here to close/

Starting the line here =and continuing here to close=

Starting the line here ~and continuing here to close~

Starting the line here _and continuing here to close_

Starting the line here +and continuing here to close+

Starting the line here *and continuing here to close*

Starting the line here /and continuing here to close/

Starting the line here =and continuing here to close=

Starting the line here ~and continuing here to close~

Starting the line here _and continuing here to close_

Starting the line here +and continuing here to close+

Starting the line here *and continuing here to close*

Starting the line here /and continuing here to close/

Starting the line here =and continuing here to close=

Starting the line here ~and continuing here to close~

Starting the line here _and continuing here to close_

Starting the line here +and continuing here to close+

Multiline support test :: two lines

emphasis_tests = ["*","/","=","~","_","+"]

all = emphasis_tests.map do |a|
  emphasis_tests.map do |b|
    [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('')
  end
end

all.each {|e| puts e}

*Starting the line here and continuing here to close*

*Starting the line here /and continuing here to close/*

*Starting the line here =and continuing here to close=*

*Starting the line here ~and continuing here to close~*

*Starting the line here _and continuing here to close_*

*Starting the line here +and continuing here to close+*

/Starting the line here *and continuing here to close*/

/Starting the line here and continuing here to close/

/Starting the line here =and continuing here to close=/

/Starting the line here ~and continuing here to close~/

/Starting the line here _and continuing here to close_/

/Starting the line here +and continuing here to close+/

=Starting the line here *and continuing here to close*=

=Starting the line here /and continuing here to close/=

=Starting the line here and continuing here to close=

=Starting the line here ~and continuing here to close~=

=Starting the line here _and continuing here to close_=

=Starting the line here +and continuing here to close+=

~Starting the line here *and continuing here to close*~

~Starting the line here /and continuing here to close/~

~Starting the line here =and continuing here to close=~

~Starting the line here and continuing here to close~

~Starting the line here _and continuing here to close_~

~Starting the line here +and continuing here to close+~

_Starting the line here *and continuing here to close*_

_Starting the line here /and continuing here to close/_

_Starting the line here =and continuing here to close=_

_Starting the line here ~and continuing here to close~_

_Starting the line here and continuing here to close_

_Starting the line here +and continuing here to close+_

+Starting the line here *and continuing here to close*+

+Starting the line here /and continuing here to close/+

+Starting the line here =and continuing here to close=+

+Starting the line here ~and continuing here to close~+

+Starting the line here _and continuing here to close_+

+Starting the line here and continuing here to close+

Together in same paragraph test

bold bold bold

italic bold italic

code bold code

verbatim bold verbatim

underline bold underline

strikethrough bold strikethrough

http://www.bing.com bold http://www.bing.com

http://www.google.com bold http://www.google.com

helpful text link bold helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png bold http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com bold http://www.google.com

bold italic bold

italic italic italic

code italic code

verbatim italic verbatim

underline italic underline

strikethrough italic strikethrough

http://www.bing.com italic http://www.bing.com

http://www.google.com italic http://www.google.com

helpful text link italic helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png italic http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com italic http://www.google.com

bold code bold

italic code italic

code code code

verbatim code verbatim

underline code underline

strikethrough code strikethrough

http://www.bing.com code http://www.bing.com

http://www.google.com code http://www.google.com

helpful text link code helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg code http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png code http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com code http://www.google.com

bold verbatim bold

italic verbatim italic

code verbatim code

verbatim verbatim verbatim

underline verbatim underline

strikethrough verbatim strikethrough

http://www.bing.com verbatim http://www.bing.com

http://www.google.com verbatim http://www.google.com

helpful text link verbatim helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png verbatim http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com verbatim http://www.google.com

bold underline bold

italic underline italic

code underline code

verbatim underline verbatim

underline underline underline

strikethrough underline strikethrough

http://www.bing.com underline http://www.bing.com

http://www.google.com underline http://www.google.com

helpful text link underline helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png underline http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com underline http://www.google.com

bold strikethrough bold

italic strikethrough italic

code strikethrough code

verbatim strikethrough verbatim

underline strikethrough underline

strikethrough strikethrough strikethrough

http://www.bing.com strikethrough http://www.bing.com

http://www.google.com strikethrough http://www.google.com

helpful text link strikethrough helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png strikethrough http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com strikethrough http://www.google.com

bold http://www.bing.com bold

italic http://www.bing.com italic

code http://www.bing.com code

verbatim http://www.bing.com verbatim

underline http://www.bing.com underline

strikethrough http://www.bing.com strikethrough

http://www.bing.com http://www.bing.com http://www.bing.com

http://www.google.com http://www.bing.com http://www.google.com

helpful text link http://www.bing.com helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png http://www.bing.com http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com http://www.bing.com http://www.google.com

bold http://www.google.com bold

italic http://www.google.com italic

code http://www.google.com code

verbatim http://www.google.com verbatim

underline http://www.google.com underline

strikethrough http://www.google.com strikethrough

http://www.bing.com http://www.google.com http://www.bing.com

http://www.google.com http://www.google.com http://www.google.com

helpful text link http://www.google.com helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png http://www.google.com http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com http://www.google.com http://www.google.com

bold helpful text link bold

italic helpful text link italic

code helpful text link code

verbatim helpful text link verbatim

underline helpful text link underline

strikethrough helpful text link strikethrough

http://www.bing.com helpful text link http://www.bing.com

http://www.google.com helpful text link http://www.google.com

helpful text link helpful text link helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png helpful text link http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com helpful text link http://www.google.com

bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg bold

italic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italic

code http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg code

verbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatim

underline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underline

strikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethrough

http://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.com

http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com

helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com

bold http://imgs.xkcd.com/comics/t_cells.png bold

italic http://imgs.xkcd.com/comics/t_cells.png italic

code http://imgs.xkcd.com/comics/t_cells.png code

verbatim http://imgs.xkcd.com/comics/t_cells.png verbatim

underline http://imgs.xkcd.com/comics/t_cells.png underline

strikethrough http://imgs.xkcd.com/comics/t_cells.png strikethrough

http://www.bing.com http://imgs.xkcd.com/comics/t_cells.png http://www.bing.com

http://www.google.com http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

helpful text link http://imgs.xkcd.com/comics/t_cells.png helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

bold http://www.google.com bold

italic http://www.google.com italic

code http://www.google.com code

verbatim http://www.google.com verbatim

underline http://www.google.com underline

strikethrough http://www.google.com strikethrough

http://www.bing.com http://www.google.com http://www.bing.com

http://www.google.com http://www.google.com http://www.google.com

helpful text link http://www.google.com helpful text link

http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

http://imgs.xkcd.com/comics/t_cells.png http://www.google.com http://imgs.xkcd.com/comics/t_cells.png

http://www.google.com http://www.google.com http://www.google.com

Together within a table

bold bolditalic boldcode boldverbatim boldunderline boldstrikethrough boldhttp://www.bing.com boldhttp://www.google.com boldhelpful text link boldhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg boldhttp://imgs.xkcd.com/comics/t_cells.png boldhttp://www.google.com bold
bold italicitalic italiccode italicverbatim italicunderline italicstrikethrough italichttp://www.bing.com italichttp://www.google.com italichelpful text link italichttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italichttp://imgs.xkcd.com/comics/t_cells.png italichttp://www.google.com italic
bold codeitalic codecode codeverbatim codeunderline codestrikethrough codehttp://www.bing.com codehttp://www.google.com codehelpful text link codehttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg codehttp://imgs.xkcd.com/comics/t_cells.png codehttp://www.google.com code
bold verbatimitalic verbatimcode verbatimverbatim verbatimunderline verbatimstrikethrough verbatimhttp://www.bing.com verbatimhttp://www.google.com verbatimhelpful text link verbatimhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatimhttp://imgs.xkcd.com/comics/t_cells.png verbatimhttp://www.google.com verbatim
bold underlineitalic underlinecode underlineverbatim underlineunderline underlinestrikethrough underlinehttp://www.bing.com underlinehttp://www.google.com underlinehelpful text link underlinehttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underlinehttp://imgs.xkcd.com/comics/t_cells.png underlinehttp://www.google.com underline
bold strikethroughitalic strikethroughcode strikethroughverbatim strikethroughunderline strikethroughstrikethrough strikethroughhttp://www.bing.com strikethroughhttp://www.google.com strikethroughhelpful text link strikethroughhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethroughhttp://imgs.xkcd.com/comics/t_cells.png strikethroughhttp://www.google.com strikethrough
bold http://www.bing.comitalic http://www.bing.comcode http://www.bing.comverbatim http://www.bing.comunderline http://www.bing.comstrikethrough http://www.bing.comhttp://www.bing.com http://www.bing.comhttp://www.google.com http://www.bing.comhelpful text link http://www.bing.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.bing.comhttp://www.google.com http://www.bing.com
bold http://www.google.comitalic http://www.google.comcode http://www.google.comverbatim http://www.google.comunderline http://www.google.comstrikethrough http://www.google.comhttp://www.bing.com http://www.google.comhttp://www.google.com http://www.google.comhelpful text link http://www.google.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.google.comhttp://www.google.com http://www.google.com
bold helpful text linkitalic helpful text linkcode helpful text linkverbatim helpful text linkunderline helpful text linkstrikethrough helpful text linkhttp://www.bing.com helpful text linkhttp://www.google.com helpful text linkhelpful text link helpful text linkhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text linkhttp://imgs.xkcd.com/comics/t_cells.png helpful text linkhttp://www.google.com helpful text link
bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgitalic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgcode http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgverbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgunderline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgstrikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghelpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg
bold http://imgs.xkcd.com/comics/t_cells.pngitalic http://imgs.xkcd.com/comics/t_cells.pngcode http://imgs.xkcd.com/comics/t_cells.pngverbatim http://imgs.xkcd.com/comics/t_cells.pngunderline http://imgs.xkcd.com/comics/t_cells.pngstrikethrough http://imgs.xkcd.com/comics/t_cells.pnghttp://www.bing.com http://imgs.xkcd.com/comics/t_cells.pnghttp://www.google.com http://imgs.xkcd.com/comics/t_cells.pnghelpful text link http://imgs.xkcd.com/comics/t_cells.pnghttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.pnghttp://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.pnghttp://www.google.com http://imgs.xkcd.com/comics/t_cells.png
bold http://www.google.comitalic http://www.google.comcode http://www.google.comverbatim http://www.google.comunderline http://www.google.comstrikethrough http://www.google.comhttp://www.bing.com http://www.google.comhttp://www.google.com http://www.google.comhelpful text link http://www.google.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.google.comhttp://www.google.com http://www.google.com
ruby-org-0.9.12/spec/html_examples/emphasis.org000066400000000000000000000777521257631261400215200ustar00rootroot00000000000000* Inline Formatting test for emphasis ** Simple feature test *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** All together in one line *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Within code test #+begin_example emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} #+end_example ** Mixed together test #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} #+end_example *Answer: *42* * *Answer: *42** *Answer: /42/ * *Answer: /42/* *Answer: =42= * *Answer: =42=* *Answer: ~42~ * *Answer: ~42~* *Answer: _42_ * *Answer: _42_* *Answer: +42+ * *Answer: +42+* /Answer: *42* / /Answer: *42*/ /Answer: /42/ / /Answer: /42// /Answer: =42= / /Answer: =42=/ /Answer: ~42~ / /Answer: ~42~/ /Answer: _42_ / /Answer: _42_/ /Answer: +42+ / /Answer: +42+/ =Answer: *42* = =Answer: *42*= =Answer: /42/ = =Answer: /42/= =Answer: =42= = =Answer: =42== =Answer: ~42~ = =Answer: ~42~= =Answer: _42_ = =Answer: _42_= =Answer: +42+ = =Answer: +42+= ~Answer: *42* ~ ~Answer: *42*~ ~Answer: /42/ ~ ~Answer: /42/~ ~Answer: =42= ~ ~Answer: =42=~ ~Answer: ~42~ ~ ~Answer: ~42~~ ~Answer: _42_ ~ ~Answer: _42_~ ~Answer: +42+ ~ ~Answer: +42+~ _Answer: *42* _ _Answer: *42*_ _Answer: /42/ _ _Answer: /42/_ _Answer: =42= _ _Answer: =42=_ _Answer: ~42~ _ _Answer: ~42~_ _Answer: _42_ _ _Answer: _42__ _Answer: +42+ _ _Answer: +42+_ +Answer: *42* + +Answer: *42*+ +Answer: /42/ + +Answer: /42/+ +Answer: =42= + +Answer: =42=+ +Answer: ~42~ + +Answer: ~42~+ +Answer: _42_ + +Answer: _42_+ +Answer: +42+ + +Answer: +42++ ** Multiline support test :: one line #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Multiline support test :: two lines #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Together in same paragraph test *bold* *bold* *bold* /italic/ *bold* /italic/ =code= *bold* =code= ~verbatim~ *bold* ~verbatim~ _underline_ *bold* _underline_ +strikethrough+ *bold* +strikethrough+ [[http://www.bing.com]] *bold* [[http://www.bing.com]] [[http://www.google.com]] *bold* [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ *bold* /italic/ /italic/ /italic/ =code= /italic/ =code= ~verbatim~ /italic/ ~verbatim~ _underline_ /italic/ _underline_ +strikethrough+ /italic/ +strikethrough+ [[http://www.bing.com]] /italic/ [[http://www.bing.com]] [[http://www.google.com]] /italic/ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] /italic/ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ *bold* =code= *bold* /italic/ =code= /italic/ =code= =code= =code= ~verbatim~ =code= ~verbatim~ _underline_ =code= _underline_ +strikethrough+ =code= +strikethrough+ [[http://www.bing.com]] =code= [[http://www.bing.com]] [[http://www.google.com]] =code= [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] =code= [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= *bold* ~verbatim~ *bold* /italic/ ~verbatim~ /italic/ =code= ~verbatim~ =code= ~verbatim~ ~verbatim~ ~verbatim~ _underline_ ~verbatim~ _underline_ +strikethrough+ ~verbatim~ +strikethrough+ [[http://www.bing.com]] ~verbatim~ [[http://www.bing.com]] [[http://www.google.com]] ~verbatim~ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] ~verbatim~ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ *bold* _underline_ *bold* /italic/ _underline_ /italic/ =code= _underline_ =code= ~verbatim~ _underline_ ~verbatim~ _underline_ _underline_ _underline_ +strikethrough+ _underline_ +strikethrough+ [[http://www.bing.com]] _underline_ [[http://www.bing.com]] [[http://www.google.com]] _underline_ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] _underline_ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ *bold* +strikethrough+ *bold* /italic/ +strikethrough+ /italic/ =code= +strikethrough+ =code= ~verbatim~ +strikethrough+ ~verbatim~ _underline_ +strikethrough+ _underline_ +strikethrough+ +strikethrough+ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] +strikethrough+ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ *bold* [[http://www.bing.com]] *bold* /italic/ [[http://www.bing.com]] /italic/ =code= [[http://www.bing.com]] =code= ~verbatim~ [[http://www.bing.com]] ~verbatim~ _underline_ [[http://www.bing.com]] _underline_ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] *bold* [[http://www.google.com]] *bold* /italic/ [[http://www.google.com]] /italic/ =code= [[http://www.google.com]] =code= ~verbatim~ [[http://www.google.com]] ~verbatim~ _underline_ [[http://www.google.com]] _underline_ +strikethrough+ [[http://www.google.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] *bold* [[http://www.xkcd.com][helpful text link]] *bold* /italic/ [[http://www.xkcd.com][helpful text link]] /italic/ =code= [[http://www.xkcd.com][helpful text link]] =code= ~verbatim~ [[http://www.xkcd.com][helpful text link]] ~verbatim~ _underline_ [[http://www.xkcd.com][helpful text link]] _underline_ +strikethrough+ [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ /italic/ =code= =code= ~verbatim~ ~verbatim~ _underline_ _underline_ +strikethrough+ +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Together within a table | *bold* *bold* | /italic/ *bold* | =code= *bold* | ~verbatim~ *bold* | _underline_ *bold* | +strikethrough+ *bold* | [[http://www.bing.com]] *bold* | [[http://www.google.com]] *bold* | [[http://www.xkcd.com][helpful text link]] *bold* | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* | *bold* | | *bold* /italic/ | /italic/ /italic/ | =code= /italic/ | ~verbatim~ /italic/ | _underline_ /italic/ | +strikethrough+ /italic/ | [[http://www.bing.com]] /italic/ | [[http://www.google.com]] /italic/ | [[http://www.xkcd.com][helpful text link]] /italic/ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ | /italic/ | | *bold* =code= | /italic/ =code= | =code= =code= | ~verbatim~ =code= | _underline_ =code= | +strikethrough+ =code= | [[http://www.bing.com]] =code= | [[http://www.google.com]] =code= | [[http://www.xkcd.com][helpful text link]] =code= | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= | =code= | | *bold* ~verbatim~ | /italic/ ~verbatim~ | =code= ~verbatim~ | ~verbatim~ ~verbatim~ | _underline_ ~verbatim~ | +strikethrough+ ~verbatim~ | [[http://www.bing.com]] ~verbatim~ | [[http://www.google.com]] ~verbatim~ | [[http://www.xkcd.com][helpful text link]] ~verbatim~ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ | ~verbatim~ | | *bold* _underline_ | /italic/ _underline_ | =code= _underline_ | ~verbatim~ _underline_ | _underline_ _underline_ | +strikethrough+ _underline_ | [[http://www.bing.com]] _underline_ | [[http://www.google.com]] _underline_ | [[http://www.xkcd.com][helpful text link]] _underline_ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ | _underline_ | | *bold* +strikethrough+ | /italic/ +strikethrough+ | =code= +strikethrough+ | ~verbatim~ +strikethrough+ | _underline_ +strikethrough+ | +strikethrough+ +strikethrough+ | [[http://www.bing.com]] +strikethrough+ | [[http://www.google.com]] +strikethrough+ | [[http://www.xkcd.com][helpful text link]] +strikethrough+ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ | +strikethrough+ | | *bold* [[http://www.bing.com]] | /italic/ [[http://www.bing.com]] | =code= [[http://www.bing.com]] | ~verbatim~ [[http://www.bing.com]] | _underline_ [[http://www.bing.com]] | +strikethrough+ [[http://www.bing.com]] | [[http://www.bing.com]] [[http://www.bing.com]] | [[http://www.google.com]] [[http://www.bing.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] | [[http://www.bing.com]] | | *bold* [[http://www.google.com]] | /italic/ [[http://www.google.com]] | =code= [[http://www.google.com]] | ~verbatim~ [[http://www.google.com]] | _underline_ [[http://www.google.com]] | +strikethrough+ [[http://www.google.com]] | [[http://www.bing.com]] [[http://www.google.com]] | [[http://www.google.com]] [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] | [[http://www.google.com]] | | *bold* [[http://www.xkcd.com][helpful text link]] | /italic/ [[http://www.xkcd.com][helpful text link]] | =code= [[http://www.xkcd.com][helpful text link]] | ~verbatim~ [[http://www.xkcd.com][helpful text link]] | _underline_ [[http://www.xkcd.com][helpful text link]] | +strikethrough+ [[http://www.xkcd.com][helpful text link]] | [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] | | *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | | *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | *bold* | /italic/ | =code= | ~verbatim~ | _underline_ | +strikethrough+ | [[http://www.bing.com]] | [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | ruby-org-0.9.12/spec/html_examples/entities.html000066400000000000000000000524031257631261400216720ustar00rootroot00000000000000

ENTITIES

Org-ruby supports “smart double quotes,” ‘smart single quotes,’ apostrophes for contractions like won’t and can’t, and other things… like elipses. Oh – and dashes.

  • Question: What does org-mode do for ampersands, like R&R? or &lt;?
  • Answer: Those get escaped, too. ☺

<Even in headlines! funner & funner!>

« They α should β be γ able δ to η exist θ in ε the same line √ ».

\laquo They won't appear in in example blocks. \raquo

⌈ — — — — — — ⌉

Though they appear in center blocks

⌊ — — — — — — ⌋

To work they have to be separated, like ♥ ♥, not like ♥\hearts.

List of entities supported

# Script to generate the list of currently supported entities
require 'org-ruby'

Orgmode::HtmlEntities.each_pair do |entity, _|
  puts "- Writing =\\#{entity}=, results in: \\#{entity}"
end
bundle exec ruby /tmp/print_entities.rb
  • Writing \Agrave, results in: À
  • Writing \agrave, results in: à
  • Writing \Aacute, results in: Á
  • Writing \aacute, results in: á
  • Writing \Acirc, results in: Â
  • Writing \acirc, results in: â
  • Writing \Atilde, results in: Ã
  • Writing \atilde, results in: ã
  • Writing \Auml, results in: Ä
  • Writing \auml, results in: ä
  • Writing \Aring, results in: Å
  • Writing \AA, results in: Å
  • Writing \aring, results in: å
  • Writing \AElig, results in: Æ
  • Writing \aelig, results in: æ
  • Writing \Ccedil, results in: Ç
  • Writing \ccedil, results in: ç
  • Writing \Egrave, results in: È
  • Writing \egrave, results in: è
  • Writing \Eacute, results in: É
  • Writing \eacute, results in: é
  • Writing \Ecirc, results in: Ê
  • Writing \ecirc, results in: ê
  • Writing \Euml, results in: Ë
  • Writing \euml, results in: ë
  • Writing \Igrave, results in: Ì
  • Writing \igrave, results in: ì
  • Writing \Iacute, results in: Í
  • Writing \iacute, results in: í
  • Writing \Icirc, results in: Î
  • Writing \icirc, results in: î
  • Writing \Iuml, results in: Ï
  • Writing \iuml, results in: ï
  • Writing \Ntilde, results in: Ñ
  • Writing \ntilde, results in: ñ
  • Writing \Ograve, results in: Ò
  • Writing \ograve, results in: ò
  • Writing \Oacute, results in: Ó
  • Writing \oacute, results in: ó
  • Writing \Ocirc, results in: Ô
  • Writing \ocirc, results in: ô
  • Writing \Otilde, results in: Õ
  • Writing \otilde, results in: õ
  • Writing \Ouml, results in: Ö
  • Writing \ouml, results in: ö
  • Writing \Oslash, results in: Ø
  • Writing \oslash, results in: ø
  • Writing \OElig, results in: Œ
  • Writing \oelig, results in: œ
  • Writing \Scaron, results in: Š
  • Writing \scaron, results in: š
  • Writing \szlig, results in: ß
  • Writing \Ugrave, results in: Ù
  • Writing \ugrave, results in: ù
  • Writing \Uacute, results in: Ú
  • Writing \uacute, results in: ú
  • Writing \Ucirc, results in: Û
  • Writing \ucirc, results in: û
  • Writing \Uuml, results in: Ü
  • Writing \uuml, results in: ü
  • Writing \Yacute, results in: Ý
  • Writing \yacute, results in: ý
  • Writing \Yuml, results in: Ÿ
  • Writing \yuml, results in: ÿ
  • Writing \fnof, results in: ƒ
  • Writing \real, results in: ℜ
  • Writing \image, results in: ℑ
  • Writing \weierp, results in: ℘
  • Writing \Alpha, results in: Α
  • Writing \alpha, results in: α
  • Writing \Beta, results in: Β
  • Writing \beta, results in: β
  • Writing \Gamma, results in: Γ
  • Writing \gamma, results in: γ
  • Writing \Delta, results in: Δ
  • Writing \delta, results in: δ
  • Writing \Epsilon, results in: Ε
  • Writing \epsilon, results in: ε
  • Writing \varepsilon, results in: ε
  • Writing \Zeta, results in: Ζ
  • Writing \zeta, results in: ζ
  • Writing \Eta, results in: Η
  • Writing \eta, results in: η
  • Writing \Theta, results in: Θ
  • Writing \theta, results in: θ
  • Writing \thetasym, results in: ϑ
  • Writing \vartheta, results in: ϑ
  • Writing \Iota, results in: Ι
  • Writing \iota, results in: ι
  • Writing \Kappa, results in: Κ
  • Writing \kappa, results in: κ
  • Writing \Lambda, results in: Λ
  • Writing \lambda, results in: λ
  • Writing \Mu, results in: Μ
  • Writing \mu, results in: μ
  • Writing \nu, results in: ν
  • Writing \Nu, results in: Ν
  • Writing \Xi, results in: Ξ
  • Writing \xi, results in: ξ
  • Writing \Omicron, results in: Ο
  • Writing \omicron, results in: ο
  • Writing \Pi, results in: Π
  • Writing \pi, results in: π
  • Writing \Rho, results in: Ρ
  • Writing \rho, results in: ρ
  • Writing \Sigma, results in: Σ
  • Writing \sigma, results in: σ
  • Writing \sigmaf, results in: ς
  • Writing \varsigma, results in: ς
  • Writing \Tau, results in: Τ
  • Writing \Upsilon, results in: Υ
  • Writing \upsih, results in: ϒ
  • Writing \upsilon, results in: υ
  • Writing \Phi, results in: Φ
  • Writing \phi, results in: φ
  • Writing \Chi, results in: Χ
  • Writing \chi, results in: χ
  • Writing \acutex, results in: ´x
  • Writing \Psi, results in: Ψ
  • Writing \psi, results in: ψ
  • Writing \tau, results in: τ
  • Writing \Omega, results in: Ω
  • Writing \omega, results in: ω
  • Writing \piv, results in: ϖ
  • Writing \partial, results in: ∂
  • Writing \alefsym, results in: ℵ
  • Writing \ETH, results in: Ð
  • Writing \eth, results in: ð
  • Writing \THORN, results in: Þ
  • Writing \thorn, results in: þ
  • Writing \dots, results in: …
  • Writing \hellip, results in: …
  • Writing \middot, results in: ·
  • Writing \iexcl, results in: ¡
  • Writing \iquest, results in: ¿
  • Writing \shy, results in: ­
  • Writing \ndash, results in: –
  • Writing \mdash, results in: —
  • Writing \quot, results in: "
  • Writing \acute, results in: ´
  • Writing \ldquo, results in: “
  • Writing \rdquo, results in: ”
  • Writing \bdquo, results in: „
  • Writing \lsquo, results in: ‘
  • Writing \rsquo, results in: ’
  • Writing \sbquo, results in: ‚
  • Writing \laquo, results in: «
  • Writing \raquo, results in: »
  • Writing \lsaquo, results in: ‹
  • Writing \rsaquo, results in: ›
  • Writing \circ, results in: ˆ
  • Writing \vert, results in: |
  • Writing \brvbar, results in: ¦
  • Writing \sect, results in: §
  • Writing \amp, results in: &
  • Writing \lt, results in: <
  • Writing \gt, results in: >
  • Writing \tilde, results in: ˜
  • Writing \slash, results in: /
  • Writing \plus, results in: +
  • Writing \under, results in: _
  • Writing \equal, results in: =
  • Writing \asciicirc, results in: ^
  • Writing \dagger, results in: †
  • Writing \Dagger, results in: ‡
  • Writing \nbsp, results in:  
  • Writing \ensp, results in:  
  • Writing \emsp, results in:  
  • Writing \thinsp, results in:  
  • Writing \curren, results in: ¤
  • Writing \cent, results in: ¢
  • Writing \pound, results in: £
  • Writing \yen, results in: ¥
  • Writing \euro, results in: €
  • Writing \EUR, results in: €
  • Writing \EURdig, results in: €
  • Writing \EURhv, results in: €
  • Writing \EURcr, results in: €
  • Writing \EURtm, results in: €
  • Writing \copy, results in: ©
  • Writing \reg, results in: ®
  • Writing \trade, results in: ™
  • Writing \minus, results in: −
  • Writing \pm, results in: ±
  • Writing \plusmn, results in: ±
  • Writing \times, results in: ×
  • Writing \frasl, results in: ⁄
  • Writing \div, results in: ÷
  • Writing \frac12, results in: ½
  • Writing \frac14, results in: ¼
  • Writing \frac34, results in: ¾
  • Writing \permil, results in: ‰
  • Writing \sup1, results in: ¹
  • Writing \sup2, results in: ²
  • Writing \sup3, results in: ³
  • Writing \radic, results in: √
  • Writing \sum, results in: ∑
  • Writing \prod, results in: ∏
  • Writing \micro, results in: µ
  • Writing \macr, results in: ¯
  • Writing \deg, results in: °
  • Writing \prime, results in: ′
  • Writing \Prime, results in: ″
  • Writing \infin, results in: ∞
  • Writing \infty, results in: ∞
  • Writing \prop, results in: ∝
  • Writing \proptp, results in: ∝
  • Writing \not, results in: ¬
  • Writing \neg, results in: ¬
  • Writing \land, results in: ∧
  • Writing \wedge, results in: ∧
  • Writing \lor, results in: ∨
  • Writing \vee, results in: ∨
  • Writing \cap, results in: ∩
  • Writing \cup, results in: ∪
  • Writing \int, results in: ∫
  • Writing \there4, results in: ∴
  • Writing \sim, results in: ∼
  • Writing \cong, results in: ≅
  • Writing \simeq, results in: ≅
  • Writing \asymp, results in: ≈
  • Writing \approx, results in: ≈
  • Writing \ne, results in: ≠
  • Writing \neq, results in: ≠
  • Writing \equiv, results in: ≡
  • Writing \le, results in: ≤
  • Writing \ge, results in: ≥
  • Writing \sub, results in: ⊂
  • Writing \subset, results in: ⊂
  • Writing \sup, results in: ⊃
  • Writing \supset, results in: ⊃
  • Writing \nsub, results in: ⊄
  • Writing \sube, results in: ⊆
  • Writing \nsup, results in: ⊅
  • Writing \supe, results in: ⊇
  • Writing \forall, results in: ∀
  • Writing \exist, results in: ∃
  • Writing \exists, results in: ∃
  • Writing \empty, results in: ∅
  • Writing \emptyset, results in: ∅
  • Writing \isin, results in: ∈
  • Writing \in, results in: ∈
  • Writing \notin, results in: ∉
  • Writing \ni, results in: ∋
  • Writing \nabla, results in: ∇
  • Writing \ang, results in: ∠
  • Writing \angle, results in: ∠
  • Writing \perp, results in: ⊥
  • Writing \sdot, results in: ⋅
  • Writing \cdot, results in: ⋅
  • Writing \lceil, results in: ⌈
  • Writing \rceil, results in: ⌉
  • Writing \lfloor, results in: ⌊
  • Writing \rfloor, results in: ⌋
  • Writing \lang, results in: ⟨
  • Writing \rang, results in: ⟩
  • Writing \larr, results in: ←
  • Writing \leftarrow, results in: ←
  • Writing \gets, results in: ←
  • Writing \lArr, results in: ⇐
  • Writing \Leftarrow, results in: ⇐
  • Writing \uarr, results in: ↑
  • Writing \uparrow, results in: ↑
  • Writing \uArr, results in: ⇑
  • Writing \Uparrow, results in: ⇑
  • Writing \rarr, results in: →
  • Writing \to, results in: →
  • Writing \rightarrow, results in: →
  • Writing \rArr, results in: ⇒
  • Writing \Rightarrow, results in: ⇒
  • Writing \darr, results in: ↓
  • Writing \downarrow, results in: ↓
  • Writing \dArr, results in: ⇓
  • Writing \Downarrow, results in: ⇓
  • Writing \harr, results in: ↔
  • Writing \leftrightarrow, results in: ↔
  • Writing \hArr, results in: ⇔
  • Writing \Leftrightarrow, results in: ⇔
  • Writing \crarr, results in: ↵
  • Writing \hookleftarrow, results in: ↵
  • Writing \arccos, results in: arccos
  • Writing \arcsin, results in: arcsin
  • Writing \arctan, results in: arctan
  • Writing \arg, results in: arg
  • Writing \cos, results in: cos
  • Writing \cosh, results in: cosh
  • Writing \cot, results in: cot
  • Writing \coth, results in: coth
  • Writing \csc, results in: csc
  • Writing \det, results in: det
  • Writing \dim, results in: dim
  • Writing \exp, results in: exp
  • Writing \gcd, results in: gcd
  • Writing \hom, results in: hom
  • Writing \inf, results in: inf
  • Writing \ker, results in: ker
  • Writing \lg, results in: lg
  • Writing \lim, results in: lim
  • Writing \liminf, results in: liminf
  • Writing \limsup, results in: limsup
  • Writing \ln, results in: ln
  • Writing \log, results in: log
  • Writing \max, results in: max
  • Writing \min, results in: min
  • Writing \Pr, results in: Pr
  • Writing \sec, results in: sec
  • Writing \sin, results in: sin
  • Writing \sinh, results in: sinh
  • Writing \tan, results in: tan
  • Writing \tanh, results in: tanh
  • Writing \bull, results in: •
  • Writing \bullet, results in: •
  • Writing \star, results in: *
  • Writing \lowast, results in: ∗
  • Writing \ast, results in: ∗
  • Writing \odot, results in: o
  • Writing \oplus, results in: ⊕
  • Writing \otimes, results in: ⊗
  • Writing \checkmark, results in: ✓
  • Writing \para, results in: ¶
  • Writing \ordf, results in: ª
  • Writing \ordm, results in: º
  • Writing \cedil, results in: ¸
  • Writing \oline, results in: ‾
  • Writing \uml, results in: ¨
  • Writing \zwnj, results in: ‌
  • Writing \zwj, results in: ‍
  • Writing \lrm, results in: ‎
  • Writing \rlm, results in: ‏
  • Writing \smile, results in: ☺
  • Writing \smiley, results in: ☺
  • Writing \blacksmile, results in: ☻
  • Writing \sad, results in: ☹
  • Writing \clubs, results in: ♣
  • Writing \clubsuit, results in: ♣
  • Writing \spades, results in: ♠
  • Writing \spadesuit, results in: ♠
  • Writing \hearts, results in: ♥
  • Writing \heartsuit, results in: ♥
  • Writing \diams, results in: ♦
  • Writing \diamondsuit, results in: ♦
  • Writing \Diamond, results in: ⋄
  • Writing \loz, results in: ◊

Some special cases

In case nothing matches, the string is returned as is.

\for \example \this \wont \break

ruby-org-0.9.12/spec/html_examples/entities.org000066400000000000000000000343251257631261400215200ustar00rootroot00000000000000#+TITLE: ENTITIES =Org-ruby= supports "smart double quotes," 'smart single quotes,' apostrophes for contractions like won't and can't, and other things... like elipses. Oh -- and dashes. - Question: What does org-mode do for ampersands, like R&R? or <? - Answer: Those get escaped, too. \smiley * \laquo They \alpha should \beta be \gamma able \delta to \eta exist \theta in \epsilon the same line \radic \raquo. #+begin_example \laquo They won't appear in in example blocks. \raquo #+end_example #+begin_center \lceil \mdash \mdash \mdash \mdash \mdash \mdash \rceil Though they appear in center blocks \lfloor \mdash \mdash \mdash \mdash \mdash \mdash \rfloor #+end_center To work they have to be separated, like \hearts \hearts, not like \hearts\hearts. * List of entities supported #+begin_example :tangle /tmp/print_entities.rb # Script to generate the list of currently supported entities require 'org-ruby' Orgmode::HtmlEntities.each_pair do |entity, _| puts "- Writing =\\#{entity}=, results in: \\#{entity}" end #+end_example #+begin_example :results output bundle exec ruby /tmp/print_entities.rb #+end_example - Writing =\Agrave=, results in: \Agrave - Writing =\agrave=, results in: \agrave - Writing =\Aacute=, results in: \Aacute - Writing =\aacute=, results in: \aacute - Writing =\Acirc=, results in: \Acirc - Writing =\acirc=, results in: \acirc - Writing =\Atilde=, results in: \Atilde - Writing =\atilde=, results in: \atilde - Writing =\Auml=, results in: \Auml - Writing =\auml=, results in: \auml - Writing =\Aring=, results in: \Aring - Writing =\AA=, results in: \AA - Writing =\aring=, results in: \aring - Writing =\AElig=, results in: \AElig - Writing =\aelig=, results in: \aelig - Writing =\Ccedil=, results in: \Ccedil - Writing =\ccedil=, results in: \ccedil - Writing =\Egrave=, results in: \Egrave - Writing =\egrave=, results in: \egrave - Writing =\Eacute=, results in: \Eacute - Writing =\eacute=, results in: \eacute - Writing =\Ecirc=, results in: \Ecirc - Writing =\ecirc=, results in: \ecirc - Writing =\Euml=, results in: \Euml - Writing =\euml=, results in: \euml - Writing =\Igrave=, results in: \Igrave - Writing =\igrave=, results in: \igrave - Writing =\Iacute=, results in: \Iacute - Writing =\iacute=, results in: \iacute - Writing =\Icirc=, results in: \Icirc - Writing =\icirc=, results in: \icirc - Writing =\Iuml=, results in: \Iuml - Writing =\iuml=, results in: \iuml - Writing =\Ntilde=, results in: \Ntilde - Writing =\ntilde=, results in: \ntilde - Writing =\Ograve=, results in: \Ograve - Writing =\ograve=, results in: \ograve - Writing =\Oacute=, results in: \Oacute - Writing =\oacute=, results in: \oacute - Writing =\Ocirc=, results in: \Ocirc - Writing =\ocirc=, results in: \ocirc - Writing =\Otilde=, results in: \Otilde - Writing =\otilde=, results in: \otilde - Writing =\Ouml=, results in: \Ouml - Writing =\ouml=, results in: \ouml - Writing =\Oslash=, results in: \Oslash - Writing =\oslash=, results in: \oslash - Writing =\OElig=, results in: \OElig - Writing =\oelig=, results in: \oelig - Writing =\Scaron=, results in: \Scaron - Writing =\scaron=, results in: \scaron - Writing =\szlig=, results in: \szlig - Writing =\Ugrave=, results in: \Ugrave - Writing =\ugrave=, results in: \ugrave - Writing =\Uacute=, results in: \Uacute - Writing =\uacute=, results in: \uacute - Writing =\Ucirc=, results in: \Ucirc - Writing =\ucirc=, results in: \ucirc - Writing =\Uuml=, results in: \Uuml - Writing =\uuml=, results in: \uuml - Writing =\Yacute=, results in: \Yacute - Writing =\yacute=, results in: \yacute - Writing =\Yuml=, results in: \Yuml - Writing =\yuml=, results in: \yuml - Writing =\fnof=, results in: \fnof - Writing =\real=, results in: \real - Writing =\image=, results in: \image - Writing =\weierp=, results in: \weierp - Writing =\Alpha=, results in: \Alpha - Writing =\alpha=, results in: \alpha - Writing =\Beta=, results in: \Beta - Writing =\beta=, results in: \beta - Writing =\Gamma=, results in: \Gamma - Writing =\gamma=, results in: \gamma - Writing =\Delta=, results in: \Delta - Writing =\delta=, results in: \delta - Writing =\Epsilon=, results in: \Epsilon - Writing =\epsilon=, results in: \epsilon - Writing =\varepsilon=, results in: \varepsilon - Writing =\Zeta=, results in: \Zeta - Writing =\zeta=, results in: \zeta - Writing =\Eta=, results in: \Eta - Writing =\eta=, results in: \eta - Writing =\Theta=, results in: \Theta - Writing =\theta=, results in: \theta - Writing =\thetasym=, results in: \thetasym - Writing =\vartheta=, results in: \vartheta - Writing =\Iota=, results in: \Iota - Writing =\iota=, results in: \iota - Writing =\Kappa=, results in: \Kappa - Writing =\kappa=, results in: \kappa - Writing =\Lambda=, results in: \Lambda - Writing =\lambda=, results in: \lambda - Writing =\Mu=, results in: \Mu - Writing =\mu=, results in: \mu - Writing =\nu=, results in: \nu - Writing =\Nu=, results in: \Nu - Writing =\Xi=, results in: \Xi - Writing =\xi=, results in: \xi - Writing =\Omicron=, results in: \Omicron - Writing =\omicron=, results in: \omicron - Writing =\Pi=, results in: \Pi - Writing =\pi=, results in: \pi - Writing =\Rho=, results in: \Rho - Writing =\rho=, results in: \rho - Writing =\Sigma=, results in: \Sigma - Writing =\sigma=, results in: \sigma - Writing =\sigmaf=, results in: \sigmaf - Writing =\varsigma=, results in: \varsigma - Writing =\Tau=, results in: \Tau - Writing =\Upsilon=, results in: \Upsilon - Writing =\upsih=, results in: \upsih - Writing =\upsilon=, results in: \upsilon - Writing =\Phi=, results in: \Phi - Writing =\phi=, results in: \phi - Writing =\Chi=, results in: \Chi - Writing =\chi=, results in: \chi - Writing =\acutex=, results in: \acutex - Writing =\Psi=, results in: \Psi - Writing =\psi=, results in: \psi - Writing =\tau=, results in: \tau - Writing =\Omega=, results in: \Omega - Writing =\omega=, results in: \omega - Writing =\piv=, results in: \piv - Writing =\partial=, results in: \partial - Writing =\alefsym=, results in: \alefsym - Writing =\ETH=, results in: \ETH - Writing =\eth=, results in: \eth - Writing =\THORN=, results in: \THORN - Writing =\thorn=, results in: \thorn - Writing =\dots=, results in: \dots - Writing =\hellip=, results in: \hellip - Writing =\middot=, results in: \middot - Writing =\iexcl=, results in: \iexcl - Writing =\iquest=, results in: \iquest - Writing =\shy=, results in: \shy - Writing =\ndash=, results in: \ndash - Writing =\mdash=, results in: \mdash - Writing =\quot=, results in: \quot - Writing =\acute=, results in: \acute - Writing =\ldquo=, results in: \ldquo - Writing =\rdquo=, results in: \rdquo - Writing =\bdquo=, results in: \bdquo - Writing =\lsquo=, results in: \lsquo - Writing =\rsquo=, results in: \rsquo - Writing =\sbquo=, results in: \sbquo - Writing =\laquo=, results in: \laquo - Writing =\raquo=, results in: \raquo - Writing =\lsaquo=, results in: \lsaquo - Writing =\rsaquo=, results in: \rsaquo - Writing =\circ=, results in: \circ - Writing =\vert=, results in: \vert - Writing =\brvbar=, results in: \brvbar - Writing =\sect=, results in: \sect - Writing =\amp=, results in: \amp - Writing =\lt=, results in: \lt - Writing =\gt=, results in: \gt - Writing =\tilde=, results in: \tilde - Writing =\slash=, results in: \slash - Writing =\plus=, results in: \plus - Writing =\under=, results in: \under - Writing =\equal=, results in: \equal - Writing =\asciicirc=, results in: \asciicirc - Writing =\dagger=, results in: \dagger - Writing =\Dagger=, results in: \Dagger - Writing =\nbsp=, results in: \nbsp - Writing =\ensp=, results in: \ensp - Writing =\emsp=, results in: \emsp - Writing =\thinsp=, results in: \thinsp - Writing =\curren=, results in: \curren - Writing =\cent=, results in: \cent - Writing =\pound=, results in: \pound - Writing =\yen=, results in: \yen - Writing =\euro=, results in: \euro - Writing =\EUR=, results in: \EUR - Writing =\EURdig=, results in: \EURdig - Writing =\EURhv=, results in: \EURhv - Writing =\EURcr=, results in: \EURcr - Writing =\EURtm=, results in: \EURtm - Writing =\copy=, results in: \copy - Writing =\reg=, results in: \reg - Writing =\trade=, results in: \trade - Writing =\minus=, results in: \minus - Writing =\pm=, results in: \pm - Writing =\plusmn=, results in: \plusmn - Writing =\times=, results in: \times - Writing =\frasl=, results in: \frasl - Writing =\div=, results in: \div - Writing =\frac12=, results in: \frac12 - Writing =\frac14=, results in: \frac14 - Writing =\frac34=, results in: \frac34 - Writing =\permil=, results in: \permil - Writing =\sup1=, results in: \sup1 - Writing =\sup2=, results in: \sup2 - Writing =\sup3=, results in: \sup3 - Writing =\radic=, results in: \radic - Writing =\sum=, results in: \sum - Writing =\prod=, results in: \prod - Writing =\micro=, results in: \micro - Writing =\macr=, results in: \macr - Writing =\deg=, results in: \deg - Writing =\prime=, results in: \prime - Writing =\Prime=, results in: \Prime - Writing =\infin=, results in: \infin - Writing =\infty=, results in: \infty - Writing =\prop=, results in: \prop - Writing =\proptp=, results in: \proptp - Writing =\not=, results in: \not - Writing =\neg=, results in: \neg - Writing =\land=, results in: \land - Writing =\wedge=, results in: \wedge - Writing =\lor=, results in: \lor - Writing =\vee=, results in: \vee - Writing =\cap=, results in: \cap - Writing =\cup=, results in: \cup - Writing =\int=, results in: \int - Writing =\there4=, results in: \there4 - Writing =\sim=, results in: \sim - Writing =\cong=, results in: \cong - Writing =\simeq=, results in: \simeq - Writing =\asymp=, results in: \asymp - Writing =\approx=, results in: \approx - Writing =\ne=, results in: \ne - Writing =\neq=, results in: \neq - Writing =\equiv=, results in: \equiv - Writing =\le=, results in: \le - Writing =\ge=, results in: \ge - Writing =\sub=, results in: \sub - Writing =\subset=, results in: \subset - Writing =\sup=, results in: \sup - Writing =\supset=, results in: \supset - Writing =\nsub=, results in: \nsub - Writing =\sube=, results in: \sube - Writing =\nsup=, results in: \nsup - Writing =\supe=, results in: \supe - Writing =\forall=, results in: \forall - Writing =\exist=, results in: \exist - Writing =\exists=, results in: \exists - Writing =\empty=, results in: \empty - Writing =\emptyset=, results in: \emptyset - Writing =\isin=, results in: \isin - Writing =\in=, results in: \in - Writing =\notin=, results in: \notin - Writing =\ni=, results in: \ni - Writing =\nabla=, results in: \nabla - Writing =\ang=, results in: \ang - Writing =\angle=, results in: \angle - Writing =\perp=, results in: \perp - Writing =\sdot=, results in: \sdot - Writing =\cdot=, results in: \cdot - Writing =\lceil=, results in: \lceil - Writing =\rceil=, results in: \rceil - Writing =\lfloor=, results in: \lfloor - Writing =\rfloor=, results in: \rfloor - Writing =\lang=, results in: \lang - Writing =\rang=, results in: \rang - Writing =\larr=, results in: \larr - Writing =\leftarrow=, results in: \leftarrow - Writing =\gets=, results in: \gets - Writing =\lArr=, results in: \lArr - Writing =\Leftarrow=, results in: \Leftarrow - Writing =\uarr=, results in: \uarr - Writing =\uparrow=, results in: \uparrow - Writing =\uArr=, results in: \uArr - Writing =\Uparrow=, results in: \Uparrow - Writing =\rarr=, results in: \rarr - Writing =\to=, results in: \to - Writing =\rightarrow=, results in: \rightarrow - Writing =\rArr=, results in: \rArr - Writing =\Rightarrow=, results in: \Rightarrow - Writing =\darr=, results in: \darr - Writing =\downarrow=, results in: \downarrow - Writing =\dArr=, results in: \dArr - Writing =\Downarrow=, results in: \Downarrow - Writing =\harr=, results in: \harr - Writing =\leftrightarrow=, results in: \leftrightarrow - Writing =\hArr=, results in: \hArr - Writing =\Leftrightarrow=, results in: \Leftrightarrow - Writing =\crarr=, results in: \crarr - Writing =\hookleftarrow=, results in: \hookleftarrow - Writing =\arccos=, results in: \arccos - Writing =\arcsin=, results in: \arcsin - Writing =\arctan=, results in: \arctan - Writing =\arg=, results in: \arg - Writing =\cos=, results in: \cos - Writing =\cosh=, results in: \cosh - Writing =\cot=, results in: \cot - Writing =\coth=, results in: \coth - Writing =\csc=, results in: \csc - Writing =\det=, results in: \det - Writing =\dim=, results in: \dim - Writing =\exp=, results in: \exp - Writing =\gcd=, results in: \gcd - Writing =\hom=, results in: \hom - Writing =\inf=, results in: \inf - Writing =\ker=, results in: \ker - Writing =\lg=, results in: \lg - Writing =\lim=, results in: \lim - Writing =\liminf=, results in: \liminf - Writing =\limsup=, results in: \limsup - Writing =\ln=, results in: \ln - Writing =\log=, results in: \log - Writing =\max=, results in: \max - Writing =\min=, results in: \min - Writing =\Pr=, results in: \Pr - Writing =\sec=, results in: \sec - Writing =\sin=, results in: \sin - Writing =\sinh=, results in: \sinh - Writing =\tan=, results in: \tan - Writing =\tanh=, results in: \tanh - Writing =\bull=, results in: \bull - Writing =\bullet=, results in: \bullet - Writing =\star=, results in: \star - Writing =\lowast=, results in: \lowast - Writing =\ast=, results in: \ast - Writing =\odot=, results in: \odot - Writing =\oplus=, results in: \oplus - Writing =\otimes=, results in: \otimes - Writing =\checkmark=, results in: \checkmark - Writing =\para=, results in: \para - Writing =\ordf=, results in: \ordf - Writing =\ordm=, results in: \ordm - Writing =\cedil=, results in: \cedil - Writing =\oline=, results in: \oline - Writing =\uml=, results in: \uml - Writing =\zwnj=, results in: \zwnj - Writing =\zwj=, results in: \zwj - Writing =\lrm=, results in: \lrm - Writing =\rlm=, results in: \rlm - Writing =\smile=, results in: \smile - Writing =\smiley=, results in: \smiley - Writing =\blacksmile=, results in: \blacksmile - Writing =\sad=, results in: \sad - Writing =\clubs=, results in: \clubs - Writing =\clubsuit=, results in: \clubsuit - Writing =\spades=, results in: \spades - Writing =\spadesuit=, results in: \spadesuit - Writing =\hearts=, results in: \hearts - Writing =\heartsuit=, results in: \heartsuit - Writing =\diams=, results in: \diams - Writing =\diamondsuit=, results in: \diamondsuit - Writing =\Diamond=, results in: \Diamond - Writing =\loz=, results in: \loz * Some special cases In case nothing matches, the string is returned as is. \for \example \this \wont \break ruby-org-0.9.12/spec/html_examples/escape-pre.html000066400000000000000000000005721257631261400220720ustar00rootroot00000000000000
<li>[ ] &#8220;smart quotes&#8221;</li> 
<li>[ ] I think I need this for &#8216;single quotes&#8217; too. Don&#8217;t I?</li> 
<li>[ ] Em dashes would be great &#8212; wouldn&#8217;t they?</li> 
<li>[ ] I hope to develop an en dash sometime in 2010 &#8211; 2011.</li> 
ruby-org-0.9.12/spec/html_examples/escape-pre.org000066400000000000000000000004631257631261400217140ustar00rootroot00000000000000 #+BEGIN_EXAMPLE
  • [ ] “smart quotes”
  • [ ] I think I need this for ‘single quotes’ too. Don’t I?
  • [ ] Em dashes would be great — wouldn’t they?
  • [ ] I hope to develop an en dash sometime in 2010 – 2011.
  • #+END_EXAMPLE ruby-org-0.9.12/spec/html_examples/export-exclude-only.html000066400000000000000000000033061257631261400237730ustar00rootroot00000000000000

    export-headline-levels.org

    What happens when you exceed the number of headline levels to export?

    1 Headline 1

    1.1 Headline 2

    This bit of body should get exported.

    1.1.1 Headline 3

    This bit of body gets exported.

    1.1.1.1 Headline 4 (include)

    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

    1.1.2 Another headline 3

    This one should not get exported!!

    1.1.2.1 Another headline 4

    This also cannot get exported!!

    ruby-org-0.9.12/spec/html_examples/export-exclude-only.org000066400000000000000000000061401257631261400236150ustar00rootroot00000000000000#+TITLE: export-headline-levels.org #+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_EXCLUDE_TAGS: exclude noexport #+TAGS: export noexport #+LINK_UP: #+LINK_HOME: What happens when you exceed the number of headline levels to export? * Shouldn't export :noexport: This text shouldn't be exported, right? ** Nor this subheading? Or its text? * Exlude me, too! :exclude: * Headline 1 :READING:DVD: ** Headline 2 This bit of body *should* get exported. *** Headline 3 :export: This bit of body gets exported. **** Headline 4 (include) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. **** Headline 4 (exclude) :noexport: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. *** Another headline 3 This one *should not* get exported!! **** Another headline 4 This also *cannot* get exported!! ruby-org-0.9.12/spec/html_examples/export-keywords.html000066400000000000000000000005261257631261400232330ustar00rootroot00000000000000

    export-keywords.org

    Testing that I can export keywords.

    1 TODO This is a todo item.

    2 DONE this item is done!

    ruby-org-0.9.12/spec/html_examples/export-keywords.org000066400000000000000000000010771257631261400230600ustar00rootroot00000000000000#+TITLE: export-keywords.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: Testing that I can export keywords. * TODO This is a todo item. * DONE this item is done! ruby-org-0.9.12/spec/html_examples/export-tags.html000066400000000000000000000026031257631261400223200ustar00rootroot00000000000000

    export-headline-levels.org

    What happens when you exceed the number of headline levels to export?

    1 Headline 1

    1.1 Headline 2

    1.1.1 Headline 3

    This bit of body gets exported.

    1.1.1.1 Headline 4 (include)

    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

    ruby-org-0.9.12/spec/html_examples/export-tags.org000066400000000000000000000062131257631261400221440ustar00rootroot00000000000000#+TITLE: export-headline-levels.org #+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: exclude noexport #+TAGS: export noexport #+LINK_UP: #+LINK_HOME: What happens when you exceed the number of headline levels to export? * Shouldn't export :noexport: This text shouldn't be exported, right? ** Nor this subheading? Or its text? * Exlude me, too! :exclude: * Headline 1 :ALLOWEDSYMBOLS_1234567890@:READING:DVD: ** Headline 2 This bit of body should not get exported. *** Headline 3 :export: This bit of body gets exported. **** Headline 4 (include) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. **** Headline 4 (exclude) :noexport: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. *** Another headline 3 This one *should not* get exported!! **** Another headline 4 This also *cannot* get exported!! ruby-org-0.9.12/spec/html_examples/export-title.html000066400000000000000000000002261257631261400225020ustar00rootroot00000000000000

    Export Title

    This simple org document should get a title from the TITLE option at the front of the file.

    ruby-org-0.9.12/spec/html_examples/export-title.org000066400000000000000000000001671257631261400223310ustar00rootroot00000000000000#+TITLE: Export Title This simple org document should get a title from the =TITLE= option at the front of the file. ruby-org-0.9.12/spec/html_examples/footnotes.html000066400000000000000000000015701257631261400220650ustar00rootroot00000000000000

    Footnotes

    Footnotes

    Using numbers 0

    Using letters and not defined in the footnote abc

    Using letters and defined in the footnote abc

    Defined in the footnote itself with markup 1

    0 Definition of first footnote

    Footnotes:

    abcdefinition of abc

    1blub

    ruby-org-0.9.12/spec/html_examples/footnotes.org000066400000000000000000000004421257631261400217050ustar00rootroot00000000000000#+TITLE: Footnotes #+OPTIONS: f:t * Footnotes Using numbers [fn:0] Using letters and not defined in the footnote [fn:abc] Using letters and defined in the footnote [fn:abc:definition of abc] Defined in the footnote itself with markup [fn:1:*blub*] [fn:0] Definition of first footnote ruby-org-0.9.12/spec/html_examples/horizontal_rule.html000066400000000000000000000002401257631261400232560ustar00rootroot00000000000000

    Useful contribution by Neil-Smithline

    5 hyphens or more,


    will produce a horizontal rule.

    ruby-org-0.9.12/spec/html_examples/horizontal_rule.org000066400000000000000000000002021257631261400230770ustar00rootroot00000000000000Useful contribution by [[http://www.neilsmithline.com][Neil-Smithline]] 5 hyphens or more, ----- will produce a horizontal rule. ruby-org-0.9.12/spec/html_examples/html-literal.html000066400000000000000000000002671257631261400224450ustar00rootroot00000000000000

    HTML literals

    ORG escapes HTML by default. This should <b>not be bold text!</b> Instead, it should look like regular text with some HTML tags around it.

    ruby-org-0.9.12/spec/html_examples/html-literal.org000066400000000000000000000002331257631261400222610ustar00rootroot00000000000000HTML literals ORG escapes HTML by default. This should not be bold text! Instead, it should look like regular text with some HTML tags around it. ruby-org-0.9.12/spec/html_examples/include-file-disabled.html000066400000000000000000000023651257631261400241550ustar00rootroot00000000000000

    Example of including a file

    Basic tests

    Within a commented block

    Within a center block

    The following included file will be centered:

    Within a blockquote

    This is similar to the center block:

    Before

    After

    Within an example block, it should not be possible to include a file.

    #+INCLUDE: "./spec/html_examples/only-list.org"
    

    Within a list

    • A list that has an included file directive
      • Only go to the first level
        • when included it always goes to the first level and absorbs next list items
    • 3rd level
    • 3rd level, though it should be a different list

    Within a table, cannot be included

    OneTwoThree
    #+INCLUDE: “./spec/html_examples/only-list.org”FiveSix
    SevenEightNine

    When including a file as an example

    When including a file as an quote

    ruby-org-0.9.12/spec/html_examples/include-file.html000066400000000000000000000115021257631261400224010ustar00rootroot00000000000000

    Example of including a file

    Basic tests

    Advanced Lists

    org-ruby supports the following list features of org-mode:

    Nested lists

    • You can have nested lists
    • This is first-level
      • This is a nested item
      • This is another nested item
    • Back to the first level
    • Another first level item
      1. This is a numbered list nested within the unordered list
      2. This is another numbered item

    Note the list ends just some more text. Make sure both list blocks are closed.

    Multi-paragraph list items

    This list will end with the end-of-file. Make sure all blocks are closed.

    • This is a list item
    • This list item has multiple paragraphs.

      This is paragraph two.

      And paragraph three.

    • Back to a list item.
      • Nested, just for grins!
      • woo hoo!

    Hyphen, Plus and Asterisk can be used to create lists

    • One
      • uno
        • ichi
      • uno
    • Two
      • dos
        • ni
        • ni
    • Three
    • Four

    BLOCKCOMMENT

    Testing that the next part is ignored

    And now back to normal!

    Within a commented block

    <li>[ ] &#8220;smart quotes&#8221;</li> 
    <li>[ ] I think I need this for &#8216;single quotes&#8217; too. Don&#8217;t I?</li> 
    <li>[ ] Em dashes would be great &#8212; wouldn&#8217;t they?</li> 
    <li>[ ] I hope to develop an en dash sometime in 2010 &#8211; 2011.</li> 
    

    Within a center block

    The following included file will be centered:

    Inline Images

    Per the org-mode spec, you can include inline images as links without any descriptive link text, like this:

    http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg

    I currently do not support the caption/link syntax, but I can include the inline image. I recognize the following image file types:

    • .jpg
    • .png
    • .gif
    • .jpeg

    Within a blockquote

    This is similar to the center block:

    Before Inline Images

    Per the org-mode spec, you can include inline images as links without any descriptive link text, like this:

    http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg

    I currently do not support the caption/link syntax, but I can include the inline image. I recognize the following image file types:

    • .jpg
    • .png
    • .gif
    • .jpeg

    After

    Within an example block, it should not be possible to include a file.

    #+INCLUDE: "./spec/html_examples/only-list.org"
    

    Within a list

    • A list that has an included file directive
      • Only go to the first level
        • when included it always goes to the first level and absorbs next list items
    • This file has only a list
    • Note it will end with nothing other than a list item.
    • the world wants to know: Will org-ruby write the closing ul tag?
    • 3rd level
    • 3rd level, though it should be a different list

    Within a table, cannot be included

    OneTwoThree
    #+INCLUDE: “./spec/html_examples/only-list.org”FiveSix
    SevenEightNine

    When including a file as an example

    - This file has only a list
    - Note it will end with nothing other than a list item.
    - the world wants to know: Will org-ruby write the closing ul tag?
    
    

    When including a file as an quote

    • This file has only a list
    • Note it will end with nothing other than a list item.
    • the world wants to know: Will org-ruby write the closing ul tag?
    ruby-org-0.9.12/spec/html_examples/include-file.org000066400000000000000000000041001257631261400222200ustar00rootroot00000000000000#+TITLE: Example of including a file #+EXPORT_EXCLUDE_TAGS: noexport * DONE Basic tests #+INCLUDE: "./spec/html_examples/advanced-lists.org" #+INCLUDE: "./spec/html_examples/blockcomment.org" * DONE Within a commented block #+BEGIN_COMMENT This will be ignored but... #+INCLUDE: "./spec/html_examples/escape-pre.org" the included file above will be rendered. #+END_COMMENT * DONE Within a center block #+BEGIN_CENTER The following included file will be centered: #+INCLUDE: "./spec/html_examples/inline-images.org" #+END_CENTER * DONE Within a blockquote This is similar to the center block: #+begin_quote Before #+INCLUDE: "./spec/html_examples/inline-images.org" After #+end_quote * DONE Within an example block, it should not be possible to include a file. : #+INCLUDE: "./spec/html_examples/only-list.org" * TODO Within a source code block :noexport: It should not be possible to include a file within a source code block. (Some versions of Emacs Org mode also have this behavior though...) #+begin_src ruby :results output included_file = <Inline Formatting

    I want to make sure I handle all inline formatting. I need to handle bold, italic, code, verbatim, underline, strikethrough.

    In addition, I need to make sure I can handle links. We’ve got simple links, like this:

    Note the last one is not a link, as the source doesn’t include it in double-brackets and I don’t auto-recognize URLs.

    I should also handle links with helpful text.

    Helpful addition from punchagan, we now recognize when the link goes to an image and make the link anchor be the image, like this:

    • http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    Also, if you make the descriptive text be an image, then it will get formatted with an image tag, like so:

    • http://imgs.xkcd.com/comics/t_cells.png

    Helpful addition from wallyqs:

    While “naked” links don’t work (like http://www.google.com), angle links do work. This should look like a link: http://www.google.com.

    It should be possible to use both kind of links on the same paragraph:

    This is an angle link http://google.com and this is a bracket link to a repository.

    This is a bracket link to a repository and this is an angle link http://google.com.

    This is a bracket link to a repository and this is a bracket link too to a repository.

    This is an angle link http://google.com and this is an angle link too http://google.com.

    ruby-org-0.9.12/spec/html_examples/inline-formatting.org000066400000000000000000000032701257631261400233150ustar00rootroot00000000000000Inline Formatting I want to make sure I handle all inline formatting. I need to handle *bold*, /italic/, =code=, ~verbatim~, _underline_, +strikethrough+. In addition, I need to make sure I can handle links. We've got simple links, like this: - [[http://www.bing.com]] - [[http://www.google.com]] - http://www.gmail.com Note the last one *is not* a link, as the source doesn't include it in double-brackets and I don't auto-recognize URLs. I should also handle links with [[http://www.xkcd.com][helpful text]]. Helpful addition from [[https://github.com/punchagan][punchagan]], we now recognize when the link goes to an image and make the link anchor be the image, like this: - [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] Also, if you make the descriptive text be an image, then it will get formatted with an image tag, like so: - [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] Helpful addition from [[https://github.com/wallyqs][wallyqs]]: While "naked" links don't work (like http://www.google.com), angle links do work. This should look like a link: . It should be possible to use both kind of links on the same paragraph: This is an angle link and this is a bracket link [[https://github.com/bdewey/org-ruby][to a repository]]. This is a bracket link [[https://github.com/bdewey/org-ruby][to a repository]] and this is an angle link . This is a bracket link [[https://github.com/bdewey/org-ruby][to a repository]] and this is a bracket link too [[https://github.com/bdewey/org-ruby][to a repository]]. This is an angle link and this is an angle link too . ruby-org-0.9.12/spec/html_examples/inline-images.html000066400000000000000000000011131257631261400225570ustar00rootroot00000000000000

    Inline Images

    Per the org-mode spec, you can include inline images as links without any descriptive link text, like this:

    http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg

    I currently do not support the caption/link syntax, but I can include the inline image. I recognize the following image file types:

    • .jpg
    • .png
    • .gif
    • .jpeg
    ruby-org-0.9.12/spec/html_examples/inline-images.org000066400000000000000000000006521257631261400224110ustar00rootroot00000000000000Inline Images Per the org-mode [[http://orgmode.org/manual/Images-and-tables.html#Images-and-tables][spec]], you can include inline images as links without any descriptive link text, like this: [[http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg]] I currently do not support the caption/link syntax, but I can include the inline image. I recognize the following image file types: - .jpg - .png - .gif - .jpeg ruby-org-0.9.12/spec/html_examples/link-features.html000066400000000000000000000026131257631261400226150ustar00rootroot00000000000000

    link-features.org

    Org-mode export supports a lot of link features. I’ve covered “simple” HTML links elsewhere. Now let’s cover links to other org files, other sections within documents, etc.

    Links to other org files

    This is a link to the code-comment.org file in the same directory. In emacs, if you click it, the other file opens. We want the same behavior in the HTML export.

    Code Comment

    Search links

    This is a search link into code-comment.org.

    Code Comment

    Correct handling of .org URIs in HTML markup routine (thanks @rayl!)

    In these links, .org used to be converted to .html. Not anymore since 0.9.2 version of the gem

    Links abbreviations

    URLs can be abbreviated by a LINK definition in the org file

    This is an abbreviated link example

    ruby-org-0.9.12/spec/html_examples/link-features.org000066400000000000000000000023161257631261400224400ustar00rootroot00000000000000#+TITLE: link-features.org #+startup: showeverything Org-mode export supports a lot of link features. I've covered "simple" HTML links elsewhere. Now let's cover links to other org files, other sections within documents, etc. * Links to other org files This is a link to the ~code-comment.org~ file in the same directory. In ~emacs~, if you click it, the other file opens. We want the same behavior in the HTML export. [[file:code-comment.org][Code Comment]] * Search links This is a search link into code-comment.org. [[file:code-comment.org::*Code%20Comment][Code Comment]] * Correct handling of .org URIs in HTML markup routine (thanks @rayl!) - [[http://foo.com][foo.com website]] - [[http://foo.org][foo.org website]] - [[http://foo.org/foo.org][foo.org/foo.org]] - [[http://localhost:4567/foo.org][localhost:4567/foo.org]] * In these links, .org used to be converted to .html. Not anymore since 0.9.2 version of the gem - [[file:path.org][file:path.org label]] - [[file:notes/path.org][file:notes/path.org label]] * Links abbreviations URLs can be abbreviated by a LINK definition in the org file #+LINK: example http://example.com/something [[example][This is an abbreviated link example]] ruby-org-0.9.12/spec/html_examples/lists.html000066400000000000000000000035301257631261400212010ustar00rootroot00000000000000

    Lists

    I want to make sure I have great support for lists.

    • This is an unordered list
    • This continues the unordered list

    And this is a paragraph after the list.

    Wrapping within the list

    • This is a single-line list item in the org file.
    • Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
    • And this is the next item. The previous item needs to be on one line to keep textile happy.
    • Ditto the previous line, actually.

    Edge cases

    • This is a single-line list.

    And this is a separate paragraph. Note the indentation in the org file.

    Invalid lists

    Note that spaces are required to denote lists. Thus, none of the following should get recognized as lists.

    -This isn’t a list. -And this isn’t a list.

    1.And this isn’t a list. 2.And this isn’t a list.

    ruby-org-0.9.12/spec/html_examples/lists.org000066400000000000000000000033121257631261400210220ustar00rootroot00000000000000* Lists I want to make sure I have great support for lists. - This is an unordered list - This continues the unordered list And this is a paragraph *after* the list. ** Wrapping within the list - This is a single-line list item in the org file. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - And this is the next item. The previous item needs to be on one line to keep =textile= happy. - Ditto the previous line, actually. ** Edge cases - This is a single-line list. And this is a *separate paragraph.* Note the indentation in the org file. ** Invalid lists Note that spaces are required to denote lists. Thus, none of the following should get recognized as lists. -This isn't a list. -And this isn't a list. 1.And this isn't a list. 2.And this isn't a list. ruby-org-0.9.12/spec/html_examples/metadata-comment.html000066400000000000000000000015771257631261400232740ustar00rootroot00000000000000

    Metadata, etc.

    I normally filter out things that look like metadata. Can’t do it any more. I need to see all of the following:

    * DONE Handle inline formatting
      CLOSED: [2009-12-26 Sat 21:41]
      :PROPERTIES:
      :ARCHIVE_TIME: 2009-12-26 Sat 22:16
      :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org
      :ARCHIVE_OLPATH: <%= @page.title %>/Future Development
      :ARCHIVE_CATEGORY: orgmode_parser
      :ARCHIVE_TODO: DONE
      :END:
    
      I still need to handle:
    
      - [ ] =Inline code=
    
      How does the =emacs= HTML parser handle *inline* formatting? Ah,
      it looks like it defines everything in =org-emphasis-alist= (line
      2855 of =org.el=).
    
      And then look at =org-emphasis-regexp-components=, line 2828 of
      =org.el=. It looks like they just use a crazy regexp for inline
      formatting. Which is good, because it means I can copy!
    
    
    
    ruby-org-0.9.12/spec/html_examples/metadata-comment.org000066400000000000000000000015461257631261400231130ustar00rootroot00000000000000* Metadata, etc. I normally filter out things that look like metadata. Can't do it any more. I need to see all of the following: #+BEGIN_EXAMPLE * DONE Handle inline formatting CLOSED: [2009-12-26 Sat 21:41] :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: I still need to handle: - [ ] =Inline code= How does the =emacs= HTML parser handle *inline* formatting? Ah, it looks like it defines everything in =org-emphasis-alist= (line 2855 of =org.el=). And then look at =org-emphasis-regexp-components=, line 2828 of =org.el=. It looks like they just use a crazy regexp for inline formatting. Which is good, because it means I can copy! #+END_EXAMPLE ruby-org-0.9.12/spec/html_examples/only-list.html000066400000000000000000000002751257631261400220000ustar00rootroot00000000000000
    • This file has only a list
    • Note it will end with nothing other than a list item.
    • the world wants to know: Will org-ruby write the closing ul tag?
    ruby-org-0.9.12/spec/html_examples/only-list.org000066400000000000000000000002271257631261400216200ustar00rootroot00000000000000- This file has only a list - Note it will end with nothing other than a list item. - the world wants to know: Will org-ruby write the closing ul tag? ruby-org-0.9.12/spec/html_examples/only-table.html000066400000000000000000000005401257631261400221070ustar00rootroot00000000000000
    OneTwoThreeFour
    FiveSixSevenEight
    NineTenElevenTwelve
    formattextincells
    ruby-org-0.9.12/spec/html_examples/only-table.org000066400000000000000000000003151257631261400217320ustar00rootroot00000000000000| One | Two | Three | Four | |----------+--------+--------+---------| | Five | Six | Seven | Eight | | Nine | Ten | Eleven | Twelve | | *format* | /text/ | ~in~ | _cells_ | ruby-org-0.9.12/spec/html_examples/options-parsing.html000066400000000000000000000004141257631261400231750ustar00rootroot00000000000000

    Options parsing

    The options hash should not make the parser throw exceptions upon unrecognized options.

    0.0.1 TODO Hello world

    Hi

    ruby-org-0.9.12/spec/html_examples/options-parsing.org000066400000000000000000000006461257631261400230270ustar00rootroot00000000000000#+TITLE: Options parsing #+TODO: TODO | DONE CANCELED #+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline author:t c:nil #+OPTIONS: creator:comment d:(not LOGBOOK) date:t e:t email:nil f:t inline:t #+OPTIONS: num:t p:nil pri:nil stat:t tags:t tasks:t tex:t timestamp:t toc:t #+OPTIONS: todo:t |:t The options hash should not make the parser throw exceptions upon unrecognized options. *** TODO Hello world Hi ruby-org-0.9.12/spec/html_examples/prepended-comma.html000066400000000000000000000026441257631261400231100ustar00rootroot00000000000000

    Removing the prepended comma from Org mode example blocks

    As mentioned in http://orgmode.org/manual/Literal-examples.html, when at the beginning of the line there is either “,*” or “,#+” this prepended comma should be removed before parsing.

    (Fixes https://github.com/bdewey/org-ruby/issues/50)

    Here the prepended comma will be removed.

    * Hello
    ** Goodbye
     *** Not a headline, but prepended comma still removed.
    * I am a headline
    

    Here the prepended comma is should not be removed.

    {
      "one":   1
    , "two":   2
    , "three": 3
    , "four":  4
    }
    

    Here the prepended comma is also removed

    Emacs Org mode implementation also removes it.

    text = <<TEXT
    #+TITLE: Prepended comma world
    * Hello world
    More text here
    TEXT
    

    Here the prepended comma will be remove for the Hello world headline

    ,  ,* Hi
    ,  
    ,  ,* This will be appended a comma
    * Hello world  
    ,  
    

    Here the prepended comma will be removed

    #+TITLE: "Hello world"
    

    This will be rendered as normal

    ,,,,,,,,,,,,,,,,,*Hello world
    
    ruby-org-0.9.12/spec/html_examples/prepended-comma.org000066400000000000000000000024201257631261400227230ustar00rootroot00000000000000* Removing the prepended comma from Org mode example blocks As mentioned in , when at the beginning of the line there is either ",*" or ",#+" this prepended comma should be removed before parsing. (Fixes ) ** DONE Here the prepended comma will be removed. #+begin_example org ,* Hello ,** Goodbye , *** Not a headline, but prepended comma still removed. ,* I am a headline #+end_example ** DONE Here the prepended comma is should not be removed. #+begin_example js { "one": 1 , "two": 2 , "three": 3 , "four": 4 } #+end_example ** DONE Here the prepended comma is also removed Emacs Org mode implementation also removes it. #+begin_example ruby text = <The mount point of the fullest disk

    query all mounted disks

    df \
    

    strip the header row

    |sed '1d' \
    

    sort by the percent full

    |awk '{print $5 " " $6}'|sort -n |tail -1 \
    

    extract the mount point

    |awk '{print $2}'
    

    Properties drawer example

    These properties are metadata so they should not be visible.

    ruby-org-0.9.12/spec/html_examples/properties_drawer.org000066400000000000000000000015141257631261400234260ustar00rootroot00000000000000# Example taken from the wiki # http://orgmode.org/manual/noweb_002dref.html#noweb_002dref * The mount point of the fullest disk :PROPERTIES: :noweb-ref: fullest-disk :END: ** query all mounted disks #+BEGIN_EXAMPLE df \ #+END_EXAMPLE ** strip the header row #+BEGIN_EXAMPLE |sed '1d' \ #+END_EXAMPLE ** sort by the percent full #+BEGIN_EXAMPLE |awk '{print $5 " " $6}'|sort -n |tail -1 \ #+END_EXAMPLE ** extract the mount point #+BEGIN_EXAMPLE |awk '{print $2}' #+END_EXAMPLE * Properties drawer example :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: These properties are metadata so they should not be visible. ruby-org-0.9.12/spec/html_examples/raw-html.html000066400000000000000000000016271257631261400216030ustar00rootroot00000000000000

    Raw html can be embedded

    The following will render the tag as is:

    Hello

    And this will render some Javascript:

    HTML blocks

    They behave as follows:

    
    Hello.
    
    

    Cases on which html should be escaped

    This should be escaped: <html><script type="text/javascript">(function(){})</script></html>

    This should be escaped: <html><script type“text/javascript”>(function(){})</script></html>=

    This should be escaped: @@html:<script type="text/javascript">@@(function(){})@@html:</script>@@

    This should be escaped: @@html:<script type“text/javascript”>@@(function(){})=

    ruby-org-0.9.12/spec/html_examples/raw-html.org000066400000000000000000000014421257631261400214210ustar00rootroot00000000000000* Raw html can be embedded The following will render the tag as is: #+html: Hello And this will render some Javascript: #+html: ** HTML blocks They behave as follows: #+begin_html

    
    Hello.
    
    

    #+end_html ** Cases on which html should be escaped This should be escaped: ~~ # Matches the first = This should be escaped: == This should be escaped: ~@@html:@@~ # Matches the first = This should be escaped: =@@html:@@= ruby-org-0.9.12/spec/html_examples/skip-header.html000066400000000000000000000002511257631261400222340ustar00rootroot00000000000000

    skip-header.org

    1 First heading

    This should be the first text in the output.

    ruby-org-0.9.12/spec/html_examples/skip-header.org000066400000000000000000000014361257631261400220650ustar00rootroot00000000000000#+TITLE: skip-header.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:t d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: This is header text. It exists in the org-file, but shouldn't show up in the HTML output. - Same with this list - Nope, shouldn't be in the output. #+BEGIN_EXAMPLE Even this code snippet shouldn't be there. Like a ninja. You can't see me. #+END_EXAMPLE * First heading This should be the first text in the output. ruby-org-0.9.12/spec/html_examples/skip-table.html000066400000000000000000000003761257631261400221030ustar00rootroot00000000000000

    skip-table.org

    Checking that tables are skipped when directed.

    For grins, here’s another table without a header. Just keep the bases covered.

    Again, in the HTML output, you should see no tables.

    ruby-org-0.9.12/spec/html_examples/skip-table.org000066400000000000000000000006431257631261400217230ustar00rootroot00000000000000#+TITLE: skip-table.org #+OPTIONS: |:nil Checking that tables are skipped when directed. | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | For grins, here's another table without a header. Just keep the bases covered. | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | Again, in the HTML output, you should see *no tables*. ruby-org-0.9.12/spec/html_examples/subsupscript-nil.html000066400000000000000000000000561257631261400233710ustar00rootroot00000000000000

    SUBSUPSCRIPT

    a^{b}

    a_{b}

    ruby-org-0.9.12/spec/html_examples/subsupscript-nil.org000066400000000000000000000000541257631261400232120ustar00rootroot00000000000000#+OPTIONS: ^:nil SUBSUPSCRIPT a^{b} a_{b} ruby-org-0.9.12/spec/html_examples/subsupscript.html000066400000000000000000000000761257631261400226130ustar00rootroot00000000000000

    SUBSUPSCRIPT

    ab

    ab

    ruby-org-0.9.12/spec/html_examples/subsupscript.org000066400000000000000000000000331257631261400224270ustar00rootroot00000000000000SUBSUPSCRIPT a^{b} a_{b} ruby-org-0.9.12/spec/html_examples/tables.html000066400000000000000000000026211257631261400213150ustar00rootroot00000000000000

    TABLES

    Different types of ORG tables.

    Simple table, no header.

    Cell oneCell two
    Cell threeCell four

    Indented table

    Cell one
    Cell two

    And here’s some paragraph content. The line breaks will need to get removed here, but not for the tables.

    Table with header

    OneTwoThree
    FourFiveSix
    SevenEightNine

    The separator row should not get printed out.

    Table with complete box

    OneTwoThree
    FourFiveSix
    SevenEightNine

    Only the first row should be a header row.

    Table with extra lines

    OneTwoThree
    FourFiveSix
    SevenEightNine
    TenElevenTwelve

    Only the first row should be a header row.

    Fix error when table starts with hline (Thanks @til!)

    foobar
    12

    https://github.com/bdewey/org-ruby/pull/34

    ruby-org-0.9.12/spec/html_examples/tables.org000066400000000000000000000022311257631261400211350ustar00rootroot00000000000000TABLES Different types of ORG tables. * Simple table, no header. | Cell one | Cell two | | Cell three | Cell four | * Indented table | Cell one | | Cell two | And here's some paragraph content. The line breaks will need to get removed here, but not for the tables. * Table with header | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | The separator row should not get printed out. * Table with complete box |-------+-------+-------| | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | |-------+-------+-------| Only the first row should be a header row. * Table with extra lines |-------+--------+--------| | One | Two | Three | |-------+--------+--------| | Four | Five | Six | | Seven | Eight | Nine | |-------+--------+--------| | Ten | Eleven | Twelve | |-------+--------+--------| Only the first row should be a header row. * Fix error when table starts with hline (Thanks @til!) |-----+-----| | foo | bar | |-----+-----| | 1 | 2 | https://github.com/bdewey/org-ruby/pull/34 ruby-org-0.9.12/spec/html_examples/text.html000066400000000000000000000017131257631261400210300ustar00rootroot00000000000000

    The simplest case: translating plain text.

    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

    ruby-org-0.9.12/spec/html_examples/text.org000066400000000000000000000016441257631261400206560ustar00rootroot00000000000000The simplest case: translating plain text. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ruby-org-0.9.12/spec/html_with_custom_markup_examples/000077500000000000000000000000001257631261400231605ustar00rootroot00000000000000ruby-org-0.9.12/spec/html_with_custom_markup_examples/blockquote.html000066400000000000000000000002671257631261400262230ustar00rootroot00000000000000

    BLOCKQUOTE

    Testing that I can have block quotes:

      

    Example:

    This is blockquote text.

    And now I’m back to normal text!

    ruby-org-0.9.12/spec/html_with_custom_markup_examples/blockquote.org000066400000000000000000000002261257631261400260410ustar00rootroot00000000000000BLOCKQUOTE Testing that I can have block quotes: #+BEGIN_QUOTE /Example:/ This is blockquote text. #+END_QUOTE And now I'm back to normal text! ruby-org-0.9.12/spec/html_with_custom_markup_examples/blockquote_default.html000066400000000000000000000003031257631261400277160ustar00rootroot00000000000000

    BLOCKQUOTE

    Testing that I can have block quotes:

    Example:

    This is blockquote text.

    And now I’m back to normal text!

    ruby-org-0.9.12/spec/html_with_custom_markup_examples/code-lists.html000066400000000000000000000041521257631261400261160ustar00rootroot00000000000000

    normal list should work

    • one text in the same line

      This is a paragraph

      • A sublist
        • Another sublist

          Sublist paragraph

      • 2nd sublist
        • 2nd sublist item

          Paragraph from 2nd sublist

    • two
      1. a new list

        paragraph

      2. another sublist
    • final list

    paragraphs in lists should work

    • Foo
      • How does this work?

        uno dos tres

      • Should not this be a paragraph?
    • Bar

    begin example in lists should work

    • Foo
      class Hello def say puts 'cheers' end end
    • Bar
      This gets lumped in to the above line "Example"
    • Hello

    begin quote in lists should work

    • Example
      • Uno Lorem
                  

        A quote!!!

        dolor

      • Dos

    tables in lists should work

    • Example
      • Table

        This table:

        ab
        01
        12
    • After the table

      The table should be above

    definition lists should work

    • Example
      Hello
      Hola Paragrap continues here
                

      Cuando me desperte, el dinosaurio estaba alli.

      Dog
      Perro Paragraph
      • Last sublist
    • Another list
      • with a sublist
    ruby-org-0.9.12/spec/html_with_custom_markup_examples/code-lists.org000066400000000000000000000023231257631261400257370ustar00rootroot00000000000000* normal list should work - one text in the same line This is a paragraph + A sublist - Another sublist Sublist paragraph + 2nd sublist - 2nd sublist item Paragraph from 2nd sublist - two 1. a new list paragraph 2. another sublist - final list * paragraphs in lists should work - Foo + How does this work? uno dos tres + Should not this be a paragraph? - Bar * begin example in lists should work - Foo #+begin_example class Hello def say puts 'cheers' end end #+end_example - Bar #+begin_example This gets lumped in to the above line "Example" #+end_example - Hello * begin quote in lists should work - Example + Uno Lorem #+begin_quote A quote!!! #+end_quote dolor + Dos * tables in lists should work - Example + Table This table: | a | b | | 0 | 1 | | 1 | 2 | - After the table The table should be above * definition lists should work - Example + Hello :: Hola Paragrap continues here #+begin_quote Cuando me desperte, el dinosaurio estaba alli. #+end_quote + Dog :: Perro Paragraph + Last sublist - Another list + with a sublist ruby-org-0.9.12/spec/html_with_custom_markup_examples/code-lists_default.html000066400000000000000000000041521257631261400276220ustar00rootroot00000000000000

    normal list should work

    • one text in the same line

      This is a paragraph

      • A sublist
        • Another sublist

          Sublist paragraph

      • 2nd sublist
        • 2nd sublist item

          Paragraph from 2nd sublist

    • two
      1. a new list

        paragraph

      2. another sublist
    • final list

    paragraphs in lists should work

    • Foo
      • How does this work?

        uno dos tres

      • Should not this be a paragraph?
    • Bar

    begin example in lists should work

    • Foo
      class Hello
        def say
          puts 'cheers'
        end
      end
          
    • Bar
      This gets lumped in to the above line "Example"
          
    • Hello

    begin quote in lists should work

    • Example
      • Uno Lorem

        A quote!!!

        dolor

      • Dos

    tables in lists should work

    • Example
      • Table

        This table:

        ab
        01
        12
    • After the table

      The table should be above

    definition lists should work

    • Example
      Hello
      Hola Paragrap continues here

      Cuando me desperte, el dinosaurio estaba alli.

      Dog
      Perro Paragraph
      • Last sublist
    • Another list
      • with a sublist
    ruby-org-0.9.12/spec/html_with_custom_markup_examples/custom_markup_for_html.yml000066400000000000000000000002421257631261400304640ustar00rootroot00000000000000--- :HtmlBlockTag: :quote: pre :example: blockquote :src: blockquote :Tags: "*": :open: strong :close: strong "/": :open: em :close: em ruby-org-0.9.12/spec/html_with_custom_markup_examples/emphasis.html000066400000000000000000001513651257631261400256720ustar00rootroot00000000000000

    Inline Formatting test for emphasis

    Simple feature test

    bold

    italic

    code

    verbatim

    underline

    strikethrough

    http://www.bing.com

    http://www.google.com

    http://www.gmail.com

    helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com

    All together in one line

    bold italic code verbatim underline strikethrough http://www.bing.com http://www.google.com http://www.gmail.com helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

    Within code test

    emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "<http://www.google.com>", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e}

    Mixed together test

    emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e}

    Answer: *42 *

    Answer: *42*

    *Answer: 42 *

    Answer: /42/

    *Answer: 42 *

    Answer: =42=

    *Answer: 42 *

    Answer: ~42~

    *Answer: 42 *

    Answer: _42_

    *Answer: 42 *

    Answer: +42+

    /Answer: 42 /

    Answer: *42*

    Answer: /42 /

    Answer: /42/

    /Answer: 42 /

    Answer: =42=

    /Answer: 42 /

    Answer: ~42~

    /Answer: 42 /

    Answer: _42_

    /Answer: 42 /

    Answer: +42+

    =Answer: 42 =

    Answer: *42*

    =Answer: 42 =

    Answer: /42/

    Answer: =42 =

    Answer: =42=

    =Answer: 42 =

    Answer: ~42~

    =Answer: 42 =

    Answer: _42_

    =Answer: 42 =

    Answer: +42+

    ~Answer: 42 ~

    Answer: *42*

    ~Answer: 42 ~

    Answer: /42/

    ~Answer: 42 ~

    Answer: =42=

    Answer: ~42 ~

    Answer: ~42~

    ~Answer: 42 ~

    Answer: _42_

    ~Answer: 42 ~

    Answer: +42+

    _Answer: 42 _

    Answer: *42*

    _Answer: 42 _

    Answer: /42/

    _Answer: 42 _

    Answer: =42=

    _Answer: 42 _

    Answer: ~42~

    Answer: _42 _

    Answer: _42_

    _Answer: 42 _

    Answer: +42+

    +Answer: 42 +

    Answer: *42*

    +Answer: 42 +

    Answer: /42/

    +Answer: 42 +

    Answer: =42=

    +Answer: 42 +

    Answer: ~42~

    +Answer: 42 +

    Answer: _42_

    Answer: +42 +

    Answer: +42+

    Multiline support test :: one line

    emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e}

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Multiline support test :: two lines

    emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e}

    *Starting the line here and continuing here to close*

    *Starting the line here /and continuing here to close/*

    *Starting the line here =and continuing here to close=*

    *Starting the line here ~and continuing here to close~*

    *Starting the line here _and continuing here to close_*

    *Starting the line here +and continuing here to close+*

    /Starting the line here *and continuing here to close*/

    /Starting the line here and continuing here to close/

    /Starting the line here =and continuing here to close=/

    /Starting the line here ~and continuing here to close~/

    /Starting the line here _and continuing here to close_/

    /Starting the line here +and continuing here to close+/

    =Starting the line here *and continuing here to close*=

    =Starting the line here /and continuing here to close/=

    =Starting the line here and continuing here to close=

    =Starting the line here ~and continuing here to close~=

    =Starting the line here _and continuing here to close_=

    =Starting the line here +and continuing here to close+=

    ~Starting the line here *and continuing here to close*~

    ~Starting the line here /and continuing here to close/~

    ~Starting the line here =and continuing here to close=~

    ~Starting the line here and continuing here to close~

    ~Starting the line here _and continuing here to close_~

    ~Starting the line here +and continuing here to close+~

    _Starting the line here *and continuing here to close*_

    _Starting the line here /and continuing here to close/_

    _Starting the line here =and continuing here to close=_

    _Starting the line here ~and continuing here to close~_

    _Starting the line here and continuing here to close_

    _Starting the line here +and continuing here to close+_

    +Starting the line here *and continuing here to close*+

    +Starting the line here /and continuing here to close/+

    +Starting the line here =and continuing here to close=+

    +Starting the line here ~and continuing here to close~+

    +Starting the line here _and continuing here to close_+

    +Starting the line here and continuing here to close+

    Together in same paragraph test

    bold bold bold

    italic bold italic

    code bold code

    verbatim bold verbatim

    underline bold underline

    strikethrough bold strikethrough

    http://www.bing.com bold http://www.bing.com

    http://www.google.com bold http://www.google.com

    helpful text link bold helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png bold http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com bold http://www.google.com

    bold italic bold

    italic italic italic

    code italic code

    verbatim italic verbatim

    underline italic underline

    strikethrough italic strikethrough

    http://www.bing.com italic http://www.bing.com

    http://www.google.com italic http://www.google.com

    helpful text link italic helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png italic http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com italic http://www.google.com

    bold code bold

    italic code italic

    code code code

    verbatim code verbatim

    underline code underline

    strikethrough code strikethrough

    http://www.bing.com code http://www.bing.com

    http://www.google.com code http://www.google.com

    helpful text link code helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg code http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png code http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com code http://www.google.com

    bold verbatim bold

    italic verbatim italic

    code verbatim code

    verbatim verbatim verbatim

    underline verbatim underline

    strikethrough verbatim strikethrough

    http://www.bing.com verbatim http://www.bing.com

    http://www.google.com verbatim http://www.google.com

    helpful text link verbatim helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png verbatim http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com verbatim http://www.google.com

    bold underline bold

    italic underline italic

    code underline code

    verbatim underline verbatim

    underline underline underline

    strikethrough underline strikethrough

    http://www.bing.com underline http://www.bing.com

    http://www.google.com underline http://www.google.com

    helpful text link underline helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png underline http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com underline http://www.google.com

    bold strikethrough bold

    italic strikethrough italic

    code strikethrough code

    verbatim strikethrough verbatim

    underline strikethrough underline

    strikethrough strikethrough strikethrough

    http://www.bing.com strikethrough http://www.bing.com

    http://www.google.com strikethrough http://www.google.com

    helpful text link strikethrough helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png strikethrough http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com strikethrough http://www.google.com

    bold http://www.bing.com bold

    italic http://www.bing.com italic

    code http://www.bing.com code

    verbatim http://www.bing.com verbatim

    underline http://www.bing.com underline

    strikethrough http://www.bing.com strikethrough

    http://www.bing.com http://www.bing.com http://www.bing.com

    http://www.google.com http://www.bing.com http://www.google.com

    helpful text link http://www.bing.com helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://www.bing.com http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://www.bing.com http://www.google.com

    bold http://www.google.com bold

    italic http://www.google.com italic

    code http://www.google.com code

    verbatim http://www.google.com verbatim

    underline http://www.google.com underline

    strikethrough http://www.google.com strikethrough

    http://www.bing.com http://www.google.com http://www.bing.com

    http://www.google.com http://www.google.com http://www.google.com

    helpful text link http://www.google.com helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://www.google.com http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://www.google.com http://www.google.com

    bold helpful text link bold

    italic helpful text link italic

    code helpful text link code

    verbatim helpful text link verbatim

    underline helpful text link underline

    strikethrough helpful text link strikethrough

    http://www.bing.com helpful text link http://www.bing.com

    http://www.google.com helpful text link http://www.google.com

    helpful text link helpful text link helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png helpful text link http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com helpful text link http://www.google.com

    bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg bold

    italic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italic

    code http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg code

    verbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatim

    underline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underline

    strikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethrough

    http://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.com

    http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com

    helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com

    bold http://imgs.xkcd.com/comics/t_cells.png bold

    italic http://imgs.xkcd.com/comics/t_cells.png italic

    code http://imgs.xkcd.com/comics/t_cells.png code

    verbatim http://imgs.xkcd.com/comics/t_cells.png verbatim

    underline http://imgs.xkcd.com/comics/t_cells.png underline

    strikethrough http://imgs.xkcd.com/comics/t_cells.png strikethrough

    http://www.bing.com http://imgs.xkcd.com/comics/t_cells.png http://www.bing.com

    http://www.google.com http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

    helpful text link http://imgs.xkcd.com/comics/t_cells.png helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

    bold http://www.google.com bold

    italic http://www.google.com italic

    code http://www.google.com code

    verbatim http://www.google.com verbatim

    underline http://www.google.com underline

    strikethrough http://www.google.com strikethrough

    http://www.bing.com http://www.google.com http://www.bing.com

    http://www.google.com http://www.google.com http://www.google.com

    helpful text link http://www.google.com helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://www.google.com http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://www.google.com http://www.google.com

    Together within a table

    bold bolditalic boldcode boldverbatim boldunderline boldstrikethrough boldhttp://www.bing.com boldhttp://www.google.com boldhelpful text link boldhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg boldhttp://imgs.xkcd.com/comics/t_cells.png boldhttp://www.google.com bold
    bold italicitalic italiccode italicverbatim italicunderline italicstrikethrough italichttp://www.bing.com italichttp://www.google.com italichelpful text link italichttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italichttp://imgs.xkcd.com/comics/t_cells.png italichttp://www.google.com italic
    bold codeitalic codecode codeverbatim codeunderline codestrikethrough codehttp://www.bing.com codehttp://www.google.com codehelpful text link codehttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg codehttp://imgs.xkcd.com/comics/t_cells.png codehttp://www.google.com code
    bold verbatimitalic verbatimcode verbatimverbatim verbatimunderline verbatimstrikethrough verbatimhttp://www.bing.com verbatimhttp://www.google.com verbatimhelpful text link verbatimhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatimhttp://imgs.xkcd.com/comics/t_cells.png verbatimhttp://www.google.com verbatim
    bold underlineitalic underlinecode underlineverbatim underlineunderline underlinestrikethrough underlinehttp://www.bing.com underlinehttp://www.google.com underlinehelpful text link underlinehttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underlinehttp://imgs.xkcd.com/comics/t_cells.png underlinehttp://www.google.com underline
    bold strikethroughitalic strikethroughcode strikethroughverbatim strikethroughunderline strikethroughstrikethrough strikethroughhttp://www.bing.com strikethroughhttp://www.google.com strikethroughhelpful text link strikethroughhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethroughhttp://imgs.xkcd.com/comics/t_cells.png strikethroughhttp://www.google.com strikethrough
    bold http://www.bing.comitalic http://www.bing.comcode http://www.bing.comverbatim http://www.bing.comunderline http://www.bing.comstrikethrough http://www.bing.comhttp://www.bing.com http://www.bing.comhttp://www.google.com http://www.bing.comhelpful text link http://www.bing.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.bing.comhttp://www.google.com http://www.bing.com
    bold http://www.google.comitalic http://www.google.comcode http://www.google.comverbatim http://www.google.comunderline http://www.google.comstrikethrough http://www.google.comhttp://www.bing.com http://www.google.comhttp://www.google.com http://www.google.comhelpful text link http://www.google.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.google.comhttp://www.google.com http://www.google.com
    bold helpful text linkitalic helpful text linkcode helpful text linkverbatim helpful text linkunderline helpful text linkstrikethrough helpful text linkhttp://www.bing.com helpful text linkhttp://www.google.com helpful text linkhelpful text link helpful text linkhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text linkhttp://imgs.xkcd.com/comics/t_cells.png helpful text linkhttp://www.google.com helpful text link
    bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgitalic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgcode http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgverbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgunderline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgstrikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghelpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg
    bold http://imgs.xkcd.com/comics/t_cells.pngitalic http://imgs.xkcd.com/comics/t_cells.pngcode http://imgs.xkcd.com/comics/t_cells.pngverbatim http://imgs.xkcd.com/comics/t_cells.pngunderline http://imgs.xkcd.com/comics/t_cells.pngstrikethrough http://imgs.xkcd.com/comics/t_cells.pnghttp://www.bing.com http://imgs.xkcd.com/comics/t_cells.pnghttp://www.google.com http://imgs.xkcd.com/comics/t_cells.pnghelpful text link http://imgs.xkcd.com/comics/t_cells.pnghttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.pnghttp://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.pnghttp://www.google.com http://imgs.xkcd.com/comics/t_cells.png
    bold http://www.google.comitalic http://www.google.comcode http://www.google.comverbatim http://www.google.comunderline http://www.google.comstrikethrough http://www.google.comhttp://www.bing.com http://www.google.comhttp://www.google.com http://www.google.comhelpful text link http://www.google.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.google.comhttp://www.google.com http://www.google.com
    ruby-org-0.9.12/spec/html_with_custom_markup_examples/emphasis.org000066400000000000000000000777521257631261400255240ustar00rootroot00000000000000* Inline Formatting test for emphasis ** Simple feature test *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** All together in one line *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Within code test #+begin_example emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} #+end_example ** Mixed together test #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} #+end_example *Answer: *42* * *Answer: *42** *Answer: /42/ * *Answer: /42/* *Answer: =42= * *Answer: =42=* *Answer: ~42~ * *Answer: ~42~* *Answer: _42_ * *Answer: _42_* *Answer: +42+ * *Answer: +42+* /Answer: *42* / /Answer: *42*/ /Answer: /42/ / /Answer: /42// /Answer: =42= / /Answer: =42=/ /Answer: ~42~ / /Answer: ~42~/ /Answer: _42_ / /Answer: _42_/ /Answer: +42+ / /Answer: +42+/ =Answer: *42* = =Answer: *42*= =Answer: /42/ = =Answer: /42/= =Answer: =42= = =Answer: =42== =Answer: ~42~ = =Answer: ~42~= =Answer: _42_ = =Answer: _42_= =Answer: +42+ = =Answer: +42+= ~Answer: *42* ~ ~Answer: *42*~ ~Answer: /42/ ~ ~Answer: /42/~ ~Answer: =42= ~ ~Answer: =42=~ ~Answer: ~42~ ~ ~Answer: ~42~~ ~Answer: _42_ ~ ~Answer: _42_~ ~Answer: +42+ ~ ~Answer: +42+~ _Answer: *42* _ _Answer: *42*_ _Answer: /42/ _ _Answer: /42/_ _Answer: =42= _ _Answer: =42=_ _Answer: ~42~ _ _Answer: ~42~_ _Answer: _42_ _ _Answer: _42__ _Answer: +42+ _ _Answer: +42+_ +Answer: *42* + +Answer: *42*+ +Answer: /42/ + +Answer: /42/+ +Answer: =42= + +Answer: =42=+ +Answer: ~42~ + +Answer: ~42~+ +Answer: _42_ + +Answer: _42_+ +Answer: +42+ + +Answer: +42++ ** Multiline support test :: one line #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Multiline support test :: two lines #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Together in same paragraph test *bold* *bold* *bold* /italic/ *bold* /italic/ =code= *bold* =code= ~verbatim~ *bold* ~verbatim~ _underline_ *bold* _underline_ +strikethrough+ *bold* +strikethrough+ [[http://www.bing.com]] *bold* [[http://www.bing.com]] [[http://www.google.com]] *bold* [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ *bold* /italic/ /italic/ /italic/ =code= /italic/ =code= ~verbatim~ /italic/ ~verbatim~ _underline_ /italic/ _underline_ +strikethrough+ /italic/ +strikethrough+ [[http://www.bing.com]] /italic/ [[http://www.bing.com]] [[http://www.google.com]] /italic/ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] /italic/ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ *bold* =code= *bold* /italic/ =code= /italic/ =code= =code= =code= ~verbatim~ =code= ~verbatim~ _underline_ =code= _underline_ +strikethrough+ =code= +strikethrough+ [[http://www.bing.com]] =code= [[http://www.bing.com]] [[http://www.google.com]] =code= [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] =code= [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= *bold* ~verbatim~ *bold* /italic/ ~verbatim~ /italic/ =code= ~verbatim~ =code= ~verbatim~ ~verbatim~ ~verbatim~ _underline_ ~verbatim~ _underline_ +strikethrough+ ~verbatim~ +strikethrough+ [[http://www.bing.com]] ~verbatim~ [[http://www.bing.com]] [[http://www.google.com]] ~verbatim~ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] ~verbatim~ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ *bold* _underline_ *bold* /italic/ _underline_ /italic/ =code= _underline_ =code= ~verbatim~ _underline_ ~verbatim~ _underline_ _underline_ _underline_ +strikethrough+ _underline_ +strikethrough+ [[http://www.bing.com]] _underline_ [[http://www.bing.com]] [[http://www.google.com]] _underline_ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] _underline_ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ *bold* +strikethrough+ *bold* /italic/ +strikethrough+ /italic/ =code= +strikethrough+ =code= ~verbatim~ +strikethrough+ ~verbatim~ _underline_ +strikethrough+ _underline_ +strikethrough+ +strikethrough+ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] +strikethrough+ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ *bold* [[http://www.bing.com]] *bold* /italic/ [[http://www.bing.com]] /italic/ =code= [[http://www.bing.com]] =code= ~verbatim~ [[http://www.bing.com]] ~verbatim~ _underline_ [[http://www.bing.com]] _underline_ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] *bold* [[http://www.google.com]] *bold* /italic/ [[http://www.google.com]] /italic/ =code= [[http://www.google.com]] =code= ~verbatim~ [[http://www.google.com]] ~verbatim~ _underline_ [[http://www.google.com]] _underline_ +strikethrough+ [[http://www.google.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] *bold* [[http://www.xkcd.com][helpful text link]] *bold* /italic/ [[http://www.xkcd.com][helpful text link]] /italic/ =code= [[http://www.xkcd.com][helpful text link]] =code= ~verbatim~ [[http://www.xkcd.com][helpful text link]] ~verbatim~ _underline_ [[http://www.xkcd.com][helpful text link]] _underline_ +strikethrough+ [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ /italic/ =code= =code= ~verbatim~ ~verbatim~ _underline_ _underline_ +strikethrough+ +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Together within a table | *bold* *bold* | /italic/ *bold* | =code= *bold* | ~verbatim~ *bold* | _underline_ *bold* | +strikethrough+ *bold* | [[http://www.bing.com]] *bold* | [[http://www.google.com]] *bold* | [[http://www.xkcd.com][helpful text link]] *bold* | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* | *bold* | | *bold* /italic/ | /italic/ /italic/ | =code= /italic/ | ~verbatim~ /italic/ | _underline_ /italic/ | +strikethrough+ /italic/ | [[http://www.bing.com]] /italic/ | [[http://www.google.com]] /italic/ | [[http://www.xkcd.com][helpful text link]] /italic/ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ | /italic/ | | *bold* =code= | /italic/ =code= | =code= =code= | ~verbatim~ =code= | _underline_ =code= | +strikethrough+ =code= | [[http://www.bing.com]] =code= | [[http://www.google.com]] =code= | [[http://www.xkcd.com][helpful text link]] =code= | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= | =code= | | *bold* ~verbatim~ | /italic/ ~verbatim~ | =code= ~verbatim~ | ~verbatim~ ~verbatim~ | _underline_ ~verbatim~ | +strikethrough+ ~verbatim~ | [[http://www.bing.com]] ~verbatim~ | [[http://www.google.com]] ~verbatim~ | [[http://www.xkcd.com][helpful text link]] ~verbatim~ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ | ~verbatim~ | | *bold* _underline_ | /italic/ _underline_ | =code= _underline_ | ~verbatim~ _underline_ | _underline_ _underline_ | +strikethrough+ _underline_ | [[http://www.bing.com]] _underline_ | [[http://www.google.com]] _underline_ | [[http://www.xkcd.com][helpful text link]] _underline_ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ | _underline_ | | *bold* +strikethrough+ | /italic/ +strikethrough+ | =code= +strikethrough+ | ~verbatim~ +strikethrough+ | _underline_ +strikethrough+ | +strikethrough+ +strikethrough+ | [[http://www.bing.com]] +strikethrough+ | [[http://www.google.com]] +strikethrough+ | [[http://www.xkcd.com][helpful text link]] +strikethrough+ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ | +strikethrough+ | | *bold* [[http://www.bing.com]] | /italic/ [[http://www.bing.com]] | =code= [[http://www.bing.com]] | ~verbatim~ [[http://www.bing.com]] | _underline_ [[http://www.bing.com]] | +strikethrough+ [[http://www.bing.com]] | [[http://www.bing.com]] [[http://www.bing.com]] | [[http://www.google.com]] [[http://www.bing.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] | [[http://www.bing.com]] | | *bold* [[http://www.google.com]] | /italic/ [[http://www.google.com]] | =code= [[http://www.google.com]] | ~verbatim~ [[http://www.google.com]] | _underline_ [[http://www.google.com]] | +strikethrough+ [[http://www.google.com]] | [[http://www.bing.com]] [[http://www.google.com]] | [[http://www.google.com]] [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] | [[http://www.google.com]] | | *bold* [[http://www.xkcd.com][helpful text link]] | /italic/ [[http://www.xkcd.com][helpful text link]] | =code= [[http://www.xkcd.com][helpful text link]] | ~verbatim~ [[http://www.xkcd.com][helpful text link]] | _underline_ [[http://www.xkcd.com][helpful text link]] | +strikethrough+ [[http://www.xkcd.com][helpful text link]] | [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] | | *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | | *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | *bold* | /italic/ | =code= | ~verbatim~ | _underline_ | +strikethrough+ | [[http://www.bing.com]] | [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | ruby-org-0.9.12/spec/html_with_custom_markup_examples/emphasis_default.html000066400000000000000000001473611257631261400273770ustar00rootroot00000000000000

    Inline Formatting test for emphasis

    Simple feature test

    bold

    italic

    code

    verbatim

    underline

    strikethrough

    http://www.bing.com

    http://www.google.com

    http://www.gmail.com

    helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com

    All together in one line

    bold italic code verbatim underline strikethrough http://www.bing.com http://www.google.com http://www.gmail.com helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

    Within code test

    emphasis_tests = [
    "*bold*",
    "/italic/",
    "=code=",
    "~verbatim~",
    "_underline_ ",
    "+strikethrough+",
    "[[http://www.bing.com]]",
    "[[http://www.google.com]]",
    "[[http://www.xkcd.com][helpful text link]]",
    "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]",
    "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]",
    "<http://www.google.com>",
    ]
    
    all = emphasis_tests.map do |a|
      emphasis_tests.map do |b|
        [b, ' ', a, ' ', b, "\n\n"].join('')
      end
    end
    
    all.each {|e| puts e}
    

    Mixed together test

    emphasis_tests = ["*","/","=","~","_","+"]
    
    all = emphasis_tests.map do |a|
      emphasis_tests.map do |b|
        [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''),
         [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten
      end
    end
    
    all.each {|e| puts e}
    

    Answer: *42 *

    Answer: *42*

    *Answer: 42 *

    Answer: /42/

    *Answer: 42 *

    Answer: =42=

    *Answer: 42 *

    Answer: ~42~

    *Answer: 42 *

    Answer: _42_

    *Answer: 42 *

    Answer: +42+

    /Answer: 42 /

    Answer: *42*

    Answer: /42 /

    Answer: /42/

    /Answer: 42 /

    Answer: =42=

    /Answer: 42 /

    Answer: ~42~

    /Answer: 42 /

    Answer: _42_

    /Answer: 42 /

    Answer: +42+

    =Answer: 42 =

    Answer: *42*

    =Answer: 42 =

    Answer: /42/

    Answer: =42 =

    Answer: =42=

    =Answer: 42 =

    Answer: ~42~

    =Answer: 42 =

    Answer: _42_

    =Answer: 42 =

    Answer: +42+

    ~Answer: 42 ~

    Answer: *42*

    ~Answer: 42 ~

    Answer: /42/

    ~Answer: 42 ~

    Answer: =42=

    Answer: ~42 ~

    Answer: ~42~

    ~Answer: 42 ~

    Answer: _42_

    ~Answer: 42 ~

    Answer: +42+

    _Answer: 42 _

    Answer: *42*

    _Answer: 42 _

    Answer: /42/

    _Answer: 42 _

    Answer: =42=

    _Answer: 42 _

    Answer: ~42~

    Answer: _42 _

    Answer: _42_

    _Answer: 42 _

    Answer: +42+

    +Answer: 42 +

    Answer: *42*

    +Answer: 42 +

    Answer: /42/

    +Answer: 42 +

    Answer: =42=

    +Answer: 42 +

    Answer: ~42~

    +Answer: 42 +

    Answer: _42_

    Answer: +42 +

    Answer: +42+

    Multiline support test :: one line

    emphasis_tests = ["*","/","=","~","_","+"]
    
    all = emphasis_tests.map do |a|
      emphasis_tests.map do |b|
        [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('')
      end
    end
    
    all.each {|e| puts e}
    

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Starting the line here *and continuing here to close*

    Starting the line here /and continuing here to close/

    Starting the line here =and continuing here to close=

    Starting the line here ~and continuing here to close~

    Starting the line here _and continuing here to close_

    Starting the line here +and continuing here to close+

    Multiline support test :: two lines

    emphasis_tests = ["*","/","=","~","_","+"]
    
    all = emphasis_tests.map do |a|
      emphasis_tests.map do |b|
        [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('')
      end
    end
    
    all.each {|e| puts e}
    

    *Starting the line here and continuing here to close*

    *Starting the line here /and continuing here to close/*

    *Starting the line here =and continuing here to close=*

    *Starting the line here ~and continuing here to close~*

    *Starting the line here _and continuing here to close_*

    *Starting the line here +and continuing here to close+*

    /Starting the line here *and continuing here to close*/

    /Starting the line here and continuing here to close/

    /Starting the line here =and continuing here to close=/

    /Starting the line here ~and continuing here to close~/

    /Starting the line here _and continuing here to close_/

    /Starting the line here +and continuing here to close+/

    =Starting the line here *and continuing here to close*=

    =Starting the line here /and continuing here to close/=

    =Starting the line here and continuing here to close=

    =Starting the line here ~and continuing here to close~=

    =Starting the line here _and continuing here to close_=

    =Starting the line here +and continuing here to close+=

    ~Starting the line here *and continuing here to close*~

    ~Starting the line here /and continuing here to close/~

    ~Starting the line here =and continuing here to close=~

    ~Starting the line here and continuing here to close~

    ~Starting the line here _and continuing here to close_~

    ~Starting the line here +and continuing here to close+~

    _Starting the line here *and continuing here to close*_

    _Starting the line here /and continuing here to close/_

    _Starting the line here =and continuing here to close=_

    _Starting the line here ~and continuing here to close~_

    _Starting the line here and continuing here to close_

    _Starting the line here +and continuing here to close+_

    +Starting the line here *and continuing here to close*+

    +Starting the line here /and continuing here to close/+

    +Starting the line here =and continuing here to close=+

    +Starting the line here ~and continuing here to close~+

    +Starting the line here _and continuing here to close_+

    +Starting the line here and continuing here to close+

    Together in same paragraph test

    bold bold bold

    italic bold italic

    code bold code

    verbatim bold verbatim

    underline bold underline

    strikethrough bold strikethrough

    http://www.bing.com bold http://www.bing.com

    http://www.google.com bold http://www.google.com

    helpful text link bold helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png bold http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com bold http://www.google.com

    bold italic bold

    italic italic italic

    code italic code

    verbatim italic verbatim

    underline italic underline

    strikethrough italic strikethrough

    http://www.bing.com italic http://www.bing.com

    http://www.google.com italic http://www.google.com

    helpful text link italic helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png italic http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com italic http://www.google.com

    bold code bold

    italic code italic

    code code code

    verbatim code verbatim

    underline code underline

    strikethrough code strikethrough

    http://www.bing.com code http://www.bing.com

    http://www.google.com code http://www.google.com

    helpful text link code helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg code http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png code http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com code http://www.google.com

    bold verbatim bold

    italic verbatim italic

    code verbatim code

    verbatim verbatim verbatim

    underline verbatim underline

    strikethrough verbatim strikethrough

    http://www.bing.com verbatim http://www.bing.com

    http://www.google.com verbatim http://www.google.com

    helpful text link verbatim helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png verbatim http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com verbatim http://www.google.com

    bold underline bold

    italic underline italic

    code underline code

    verbatim underline verbatim

    underline underline underline

    strikethrough underline strikethrough

    http://www.bing.com underline http://www.bing.com

    http://www.google.com underline http://www.google.com

    helpful text link underline helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png underline http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com underline http://www.google.com

    bold strikethrough bold

    italic strikethrough italic

    code strikethrough code

    verbatim strikethrough verbatim

    underline strikethrough underline

    strikethrough strikethrough strikethrough

    http://www.bing.com strikethrough http://www.bing.com

    http://www.google.com strikethrough http://www.google.com

    helpful text link strikethrough helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png strikethrough http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com strikethrough http://www.google.com

    bold http://www.bing.com bold

    italic http://www.bing.com italic

    code http://www.bing.com code

    verbatim http://www.bing.com verbatim

    underline http://www.bing.com underline

    strikethrough http://www.bing.com strikethrough

    http://www.bing.com http://www.bing.com http://www.bing.com

    http://www.google.com http://www.bing.com http://www.google.com

    helpful text link http://www.bing.com helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://www.bing.com http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://www.bing.com http://www.google.com

    bold http://www.google.com bold

    italic http://www.google.com italic

    code http://www.google.com code

    verbatim http://www.google.com verbatim

    underline http://www.google.com underline

    strikethrough http://www.google.com strikethrough

    http://www.bing.com http://www.google.com http://www.bing.com

    http://www.google.com http://www.google.com http://www.google.com

    helpful text link http://www.google.com helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://www.google.com http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://www.google.com http://www.google.com

    bold helpful text link bold

    italic helpful text link italic

    code helpful text link code

    verbatim helpful text link verbatim

    underline helpful text link underline

    strikethrough helpful text link strikethrough

    http://www.bing.com helpful text link http://www.bing.com

    http://www.google.com helpful text link http://www.google.com

    helpful text link helpful text link helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png helpful text link http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com helpful text link http://www.google.com

    bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg bold

    italic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italic

    code http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg code

    verbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatim

    underline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underline

    strikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethrough

    http://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.com

    http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com

    helpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com

    bold http://imgs.xkcd.com/comics/t_cells.png bold

    italic http://imgs.xkcd.com/comics/t_cells.png italic

    code http://imgs.xkcd.com/comics/t_cells.png code

    verbatim http://imgs.xkcd.com/comics/t_cells.png verbatim

    underline http://imgs.xkcd.com/comics/t_cells.png underline

    strikethrough http://imgs.xkcd.com/comics/t_cells.png strikethrough

    http://www.bing.com http://imgs.xkcd.com/comics/t_cells.png http://www.bing.com

    http://www.google.com http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

    helpful text link http://imgs.xkcd.com/comics/t_cells.png helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://imgs.xkcd.com/comics/t_cells.png http://www.google.com

    bold http://www.google.com bold

    italic http://www.google.com italic

    code http://www.google.com code

    verbatim http://www.google.com verbatim

    underline http://www.google.com underline

    strikethrough http://www.google.com strikethrough

    http://www.bing.com http://www.google.com http://www.bing.com

    http://www.google.com http://www.google.com http://www.google.com

    helpful text link http://www.google.com helpful text link

    http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg

    http://imgs.xkcd.com/comics/t_cells.png http://www.google.com http://imgs.xkcd.com/comics/t_cells.png

    http://www.google.com http://www.google.com http://www.google.com

    Together within a table

    bold bolditalic boldcode boldverbatim boldunderline boldstrikethrough boldhttp://www.bing.com boldhttp://www.google.com boldhelpful text link boldhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg boldhttp://imgs.xkcd.com/comics/t_cells.png boldhttp://www.google.com bold
    bold italicitalic italiccode italicverbatim italicunderline italicstrikethrough italichttp://www.bing.com italichttp://www.google.com italichelpful text link italichttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg italichttp://imgs.xkcd.com/comics/t_cells.png italichttp://www.google.com italic
    bold codeitalic codecode codeverbatim codeunderline codestrikethrough codehttp://www.bing.com codehttp://www.google.com codehelpful text link codehttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg codehttp://imgs.xkcd.com/comics/t_cells.png codehttp://www.google.com code
    bold verbatimitalic verbatimcode verbatimverbatim verbatimunderline verbatimstrikethrough verbatimhttp://www.bing.com verbatimhttp://www.google.com verbatimhelpful text link verbatimhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg verbatimhttp://imgs.xkcd.com/comics/t_cells.png verbatimhttp://www.google.com verbatim
    bold underlineitalic underlinecode underlineverbatim underlineunderline underlinestrikethrough underlinehttp://www.bing.com underlinehttp://www.google.com underlinehelpful text link underlinehttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg underlinehttp://imgs.xkcd.com/comics/t_cells.png underlinehttp://www.google.com underline
    bold strikethroughitalic strikethroughcode strikethroughverbatim strikethroughunderline strikethroughstrikethrough strikethroughhttp://www.bing.com strikethroughhttp://www.google.com strikethroughhelpful text link strikethroughhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg strikethroughhttp://imgs.xkcd.com/comics/t_cells.png strikethroughhttp://www.google.com strikethrough
    bold http://www.bing.comitalic http://www.bing.comcode http://www.bing.comverbatim http://www.bing.comunderline http://www.bing.comstrikethrough http://www.bing.comhttp://www.bing.com http://www.bing.comhttp://www.google.com http://www.bing.comhelpful text link http://www.bing.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.bing.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.bing.comhttp://www.google.com http://www.bing.com
    bold http://www.google.comitalic http://www.google.comcode http://www.google.comverbatim http://www.google.comunderline http://www.google.comstrikethrough http://www.google.comhttp://www.bing.com http://www.google.comhttp://www.google.com http://www.google.comhelpful text link http://www.google.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.google.comhttp://www.google.com http://www.google.com
    bold helpful text linkitalic helpful text linkcode helpful text linkverbatim helpful text linkunderline helpful text linkstrikethrough helpful text linkhttp://www.bing.com helpful text linkhttp://www.google.com helpful text linkhelpful text link helpful text linkhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg helpful text linkhttp://imgs.xkcd.com/comics/t_cells.png helpful text linkhttp://www.google.com helpful text link
    bold http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgitalic http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgcode http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgverbatim http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgunderline http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpgstrikethrough http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.bing.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghelpful text link http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://imgs.xkcd.com/comics/t_cells.png http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpghttp://www.google.com http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg
    bold http://imgs.xkcd.com/comics/t_cells.pngitalic http://imgs.xkcd.com/comics/t_cells.pngcode http://imgs.xkcd.com/comics/t_cells.pngverbatim http://imgs.xkcd.com/comics/t_cells.pngunderline http://imgs.xkcd.com/comics/t_cells.pngstrikethrough http://imgs.xkcd.com/comics/t_cells.pnghttp://www.bing.com http://imgs.xkcd.com/comics/t_cells.pnghttp://www.google.com http://imgs.xkcd.com/comics/t_cells.pnghelpful text link http://imgs.xkcd.com/comics/t_cells.pnghttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://imgs.xkcd.com/comics/t_cells.pnghttp://imgs.xkcd.com/comics/t_cells.png http://imgs.xkcd.com/comics/t_cells.pnghttp://www.google.com http://imgs.xkcd.com/comics/t_cells.png
    bold http://www.google.comitalic http://www.google.comcode http://www.google.comverbatim http://www.google.comunderline http://www.google.comstrikethrough http://www.google.comhttp://www.bing.com http://www.google.comhttp://www.google.com http://www.google.comhelpful text link http://www.google.comhttp://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg http://www.google.comhttp://imgs.xkcd.com/comics/t_cells.png http://www.google.comhttp://www.google.com http://www.google.com
    ruby-org-0.9.12/spec/html_with_custom_markup_examples/incorrect_markup_for_html.yml000066400000000000000000000002451257631261400311450ustar00rootroot00000000000000--- :Block: :quotes: pre :examples: blockquote :sources: blockquote :HTMLTags: "*": :open: strong :close: strong "/": :open: em :close: em ruby-org-0.9.12/spec/line_spec.rb000066400000000000000000000156251257631261400166110ustar00rootroot00000000000000require 'spec_helper' describe Orgmode::Line do it "should tell comments" do comments = ["# hello", " # hello" ] comments.each do |c| line = Orgmode::Line.new c expect(line.comment?).to be_truthy end not_comments = ["", "\n", "hello\n", " foo ### bar\n"] not_comments.each do |c| line = Orgmode::Line.new c expect(line.comment?).to be_falsy end end it "should tell blank lines" do blank = ["", " ", "\t", "\n", " \t\t\n\n"] blank.each do |b| line = Orgmode::Line.new b expect(line.blank?).to be_truthy end end [": inline", " : inline", "\t\t:\tinline"].each do |inline_example| it "should recognize this inline example: #{inline_example}" do expect(Orgmode::Line.new(inline_example).inline_example?).to be_truthy end end list_formats = ["- ", "+ ", " - ", " + ", " 1. ", " 2) "] list_formats.each do |list| it "should recognize this list format: '#{list}'" do line = Orgmode::Line.new list expect(line.plain_list?).to be_truthy end end ["-foo", "+foo", "1.foo", "2.foo"].each do |invalid_list| it "should not recognize this invalid list: '#{invalid_list}'" do line = Orgmode::Line.new invalid_list expect(line.plain_list?).to be_falsy end end it "should recognize horizontal rules" do expect(Orgmode::Line.new("-----").horizontal_rule?).to be_truthy expect(Orgmode::Line.new("----------").horizontal_rule?).to be_truthy expect(Orgmode::Line.new(" \t ----- \t\t\t").horizontal_rule?).to be_truthy expect(Orgmode::Line.new("----").horizontal_rule?).to be_falsy end it "should recognize table rows" do expect(Orgmode::Line.new("| One | Two | Three |").table_row?).to be_truthy expect(Orgmode::Line.new(" |-------+-------+-------|\n").table_separator?).to be_truthy expect(Orgmode::Line.new("| Four | Five | Six |").table_row?).to be_truthy expect(Orgmode::Line.new("| Seven | Eight | Nine |").table_row?).to be_truthy end it "should recognize indentation" do expect(Orgmode::Line.new("").indent).to eql(0) expect(Orgmode::Line.new(" a").indent).to eql(1) expect(Orgmode::Line.new(" ").indent).to eql(0) expect(Orgmode::Line.new(" \n").indent).to eql(0) expect(Orgmode::Line.new(" a").indent).to eql(3) end it "should return paragraph type" do expect(Orgmode::Line.new("").paragraph_type).to eql(:blank) expect(Orgmode::Line.new("1. foo").paragraph_type).to eql(:list_item) expect(Orgmode::Line.new("- [ ] checkbox").paragraph_type).to eql(:list_item) expect(Orgmode::Line.new("hello!").paragraph_type).to eql(:paragraph) end it "should recognize BEGIN and END comments" do begin_examples = { "#+BEGIN_SRC emacs-lisp -n -r\n" => "SRC", "#+BEGIN_EXAMPLE" => "EXAMPLE", "\t#+BEGIN_QUOTE " => "QUOTE" } end_examples = { "#+END_SRC" => "SRC", "#+END_EXAMPLE" => "EXAMPLE", "\t#+END_QUOTE " => "QUOTE" } begin_examples.each_key do |str| line = Orgmode::Line.new str expect(line.begin_block?).to be_truthy expect(line.block_type).to eql(begin_examples[str]) end end_examples.each_key do |str| line = Orgmode::Line.new str expect(line.end_block?).to be_truthy expect(line.block_type).to eql(end_examples[str]) end end context "when a block has header arguments" do cases = { "#+begin_src :hello world" => { ':hello' => 'world' }, "#+begin_src ruby -n -r -l \"asdf\" asdf asdf :asdf asdf" => { ':asdf' => 'asdf' }, "#+begin_src ruby :results \"he:llo\" :results :hello :tangle somewhere.rb :exports code :shebang #!/bin/bash" => { ':results' => '"he:llo"', ':tangle' => 'somewhere.rb', ':exports' => 'code', ':shebang' => '#!/bin/bash' }, "#+begin_src clojure :results :hello :tangle somewhere.rb :exports code" => { ':tangle' => 'somewhere.rb', ':exports' => 'code' }, "#+begin_src js :results output :hello :tangle somewhere.rb :exports code" => { ':results' => 'output', ':tangle' => 'somewhere.rb', ':exports' => 'code' } } cases.each_pair do |example, expected| it "should recognize #{example}" do line = Orgmode::Line.new example expect(line.block_header_arguments).to eq(expected) end end end context "when initializing" do cases = { "# this looks like a comment" => :comment, " 1. This looks like an ordered list" => :ordered_list, " - this looks like an # unordered list" => :unordered_list, " | one | two | table! | \n" => :table_row, "\n" => :blank, " |-----+-----+--------| \n" => :table_separator } cases.each_pair do |example, expected| it "should accept '#{example}' with assigned type #{expected}" do line = Orgmode::Line.new(example, nil, expected) expect(line.assigned_paragraph_type).to eq(expected) end end end it "should parse in-buffer settings" do cases = { "#+ARCHIVE: %s_done" => { :key => "ARCHIVE", :value => "%s_done" }, "#+CATEGORY: foo" => { :key => "CATEGORY", :value => "foo"}, "#+BEGIN_EXAMPLE:" => { :key => "BEGIN_EXAMPLE", :value => "" }, "#+A:" => { :key => "A", :value => "" } # Boundary: Smallest keyword is one letter } cases.each_pair do |key, value| l = Orgmode::Line.new key expect(l.in_buffer_setting?).to be_truthy called = nil l.in_buffer_setting? do |k, v| expect(k).to eql(value[:key]) expect(v).to eql(value[:value]) called = true end expect(called).to be true end end it "should reject ill-formed settings" do cases = [ "##+ARCHIVE: blah", "#CATEGORY: foo", "", "\n", " #+BEGIN_EXAMPLE:\n" ] cases.each do |c| l = Orgmode::Line.new c expect(l.in_buffer_setting?).to be_nil end end context "at the start of a results block" do cases = [ "#+RESULTS: hello-world", "#+RESULTS: ", "#+RESULTS:", "#+results: HELLO-WORLD", "#+results: ", "#+results:" ] cases.each do |c| it "should recognize #{c}" do l = Orgmode::Line.new(c).start_of_results_code_block? expect(l).to be_truthy end end end it "should recognize an included file" do expect(Orgmode::Line.new("#+INCLUDE: \"~/somefile.org\"").include_file?).to be_truthy end it "should recognize an included file with specific lines" do expect(Orgmode::Line.new("#+INCLUDE: \"~/somefile.org\" :lines \"4-18\"").include_file?).to be_truthy end it "should recognize an included code file" do expect(Orgmode::Line.new("#+INCLUDE: \"~/somefile.org\" src ruby").include_file?).to be_truthy end end ruby-org-0.9.12/spec/markdown_examples/000077500000000000000000000000001257631261400200325ustar00rootroot00000000000000ruby-org-0.9.12/spec/markdown_examples/advanced-lists.md000066400000000000000000000015341257631261400232600ustar00rootroot00000000000000Advanced Lists `org-ruby` supports the following list features of `org-mode`: # Nested lists * You can have nested lists * This is first-level * This is a nested item * This is another nested item * Back to the first level * Another first level item * This is a numbered list nested within the unordered list * This is another numbered item Note the list ends just some more text. Make sure both list blocks are closed. # Multi-paragraph list items This list will end with the end-of-file. Make sure all blocks are closed. * This is a list item * This list item has multiple paragraphs. This is paragraph two. And paragraph three. * Back to a list item. * Nested, just for grins! * woo hoo! # Hyphen, Plus and Asterisk can be used to create lists * One * uno * ichi * uno * Two * dos * ni * ni * Three * Four ruby-org-0.9.12/spec/markdown_examples/advanced-lists.org000066400000000000000000000015671257631261400234550ustar00rootroot00000000000000Advanced Lists =org-ruby= supports the following list features of =org-mode=: * Nested lists - You can have nested lists - This is first-level - This is a nested item - This is another nested item - Back to the first level - Another first level item 1. This is a numbered list nested within the unordered list 2. This is another numbered item Note the list ends just some more text. Make sure both list blocks are closed. * Multi-paragraph list items This list will end with the end-of-file. Make sure all blocks are closed. - This is a list item - This list item has multiple paragraphs. This is paragraph two. And paragraph three. - Back to a list item. - Nested, just for grins! - woo hoo! * Hyphen, Plus and Asterisk can be used to create lists - One * uno + ichi * uno - Two + dos * ni * ni - Three - Four ruby-org-0.9.12/spec/markdown_examples/block_code.md000066400000000000000000000010771257631261400224450ustar00rootroot00000000000000# Block Code I need to get block code examples working. In `orgmode`, they look like this: ``` def initialize(output) @output = output @buffer = "" @output_type = :start @list_indent_stack = [] @paragraph_modifier = nil @logger = Logger.new(STDERR) @logger.level = Logger::WARN end ``` And now I should be back to normal text. Putting in another paragraph for good measure. Code should also get cancelled by a list, thus: ``` This is my code! Another line! ``` * My list should cancel this. * Another list line. ruby-org-0.9.12/spec/markdown_examples/block_code.org000066400000000000000000000011521257631261400226260ustar00rootroot00000000000000* Block Code I need to get block code examples working. In =orgmode=, they look like this: #+BEGIN_EXAMPLE def initialize(output) @output = output @buffer = "" @output_type = :start @list_indent_stack = [] @paragraph_modifier = nil @logger = Logger.new(STDERR) @logger.level = Logger::WARN end #+END_EXAMPLE And now I should be back to normal text. Putting in another paragraph for good measure. Code should also get cancelled by a list, thus: #+BEGIN_EXAMPLE This is my code! Another line! #+END_EXAMPLE - My list should cancel this. - Another list line. ruby-org-0.9.12/spec/markdown_examples/blockcomment.md000066400000000000000000000001171257631261400230300ustar00rootroot00000000000000BLOCKCOMMENT Testing that the next part is ignored And now back to normal! ruby-org-0.9.12/spec/markdown_examples/blockcomment.org000066400000000000000000000002361257631261400232210ustar00rootroot00000000000000BLOCKCOMMENT Testing that the next part is ignored #+BEGIN_COMMENT /Foo/ #+BEGIN_SRC c++ int main() { } #+END_SRC #+END_COMMENT And now back to normal! ruby-org-0.9.12/spec/markdown_examples/blockquote.md000066400000000000000000000002001257631261400225140ustar00rootroot00000000000000BLOCKQUOTE Testing that I can have block quotes: > *Example:* > This is blockquote text. And now I'm back to normal text! ruby-org-0.9.12/spec/markdown_examples/blockquote.org000066400000000000000000000002261257631261400227130ustar00rootroot00000000000000BLOCKQUOTE Testing that I can have block quotes: #+BEGIN_QUOTE /Example:/ This is blockquote text. #+END_QUOTE And now I'm back to normal text! ruby-org-0.9.12/spec/markdown_examples/center.md000066400000000000000000000000451257631261400216330ustar00rootroot00000000000000 not center center not center, again ruby-org-0.9.12/spec/markdown_examples/center.org000066400000000000000000000001161257631261400220210ustar00rootroot00000000000000#+TITLE: Fou not center #+BEGIN_CENTER center #+END_CENTER not center, again ruby-org-0.9.12/spec/markdown_examples/code-block-lists.md000066400000000000000000000014011257631261400235060ustar00rootroot00000000000000# Code blocks in lists ## No spaces in code block - List starts + Block without indentation #+begin_example puts "test" #+end_example - List continues here + and finished here * List starts * Block without indentation ``` puts "test" ``` * List continues here * and finished here ## Code block indented - List starts + Block without indentation #+begin_example ruby puts "test" #+end_example - List continues here + and finished here * List starts * Block without indentation ``` puts "test" ``` * List continues here * and finished here ## Indentation level in example block - Indentation of a begin_example code block #+begin_example (+ 3 5) #+end_example * Indentation of a begin_example code block ``` (+ 3 5) ``` ruby-org-0.9.12/spec/markdown_examples/code-block-lists.org000066400000000000000000000015611257631261400237040ustar00rootroot00000000000000* Code blocks in lists ** No spaces in code block : - List starts : + Block without indentation : #+begin_example : puts "test" : #+end_example : - List continues here : + and finished here - List starts + Block without indentation #+begin_example puts "test" #+end_example - List continues here + and finished here ** Code block indented : - List starts : + Block without indentation : #+begin_example ruby : puts "test" : #+end_example : - List continues here : + and finished here - List starts + Block without indentation #+begin_example puts "test" #+end_example - List continues here + and finished here ** Indentation level in example block : - Indentation of a begin_example code block : #+begin_example : (+ 3 5) : #+end_example : - Indentation of a begin_example code block #+begin_example (+ 3 5) #+end_example ruby-org-0.9.12/spec/markdown_examples/code-comment.md000066400000000000000000000011421257631261400227240ustar00rootroot00000000000000# Code Comment I need to be able to export things that look like org-mode comments inside of code blocks, like this: ``` #+TITLE: orgmode_parser.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: ``` ruby-org-0.9.12/spec/markdown_examples/code-comment.org000066400000000000000000000011771257631261400231230ustar00rootroot00000000000000* Code Comment I need to be able to export things that look like org-mode comments inside of code blocks, like this: #+BEGIN_EXAMPLE #+TITLE: orgmode_parser.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+END_EXAMPLE ruby-org-0.9.12/spec/markdown_examples/code-lists.md000066400000000000000000000017751257631261400224340ustar00rootroot00000000000000# normal list should work * one text in the same line This is a paragraph * A sublist * Another sublist Sublist paragraph * 2nd sublist * 2nd sublist item Paragraph from 2nd sublist * two * a new list paragraph * another sublist * final list # paragraphs in lists should work * Foo * How does this work? uno dos tres * Should not this be a paragraph? * Bar # begin example in lists should work * Foo ``` class Hello def say puts 'cheers' end end ``` * Bar ``` This gets lumped in to the above line "Example" ``` * Hello # begin quote in lists should work * Example * Uno Lorem A quote!!! dolor * Dos # tables in lists should work * Example * Table This table: | a | b | | 0 | 1 | | 1 | 2 | * After the table The table should be above # definition lists should work * Example Hello :: Hola Paragrap continues here Cuando me desperte, el dinosaurio estaba alli. Dog :: Perro Paragraph * Last sublist * Another list * with a sublist ruby-org-0.9.12/spec/markdown_examples/code-lists.org000066400000000000000000000023231257631261400226110ustar00rootroot00000000000000* normal list should work - one text in the same line This is a paragraph + A sublist - Another sublist Sublist paragraph + 2nd sublist - 2nd sublist item Paragraph from 2nd sublist - two 1. a new list paragraph 2. another sublist - final list * paragraphs in lists should work - Foo + How does this work? uno dos tres + Should not this be a paragraph? - Bar * begin example in lists should work - Foo #+begin_example class Hello def say puts 'cheers' end end #+end_example - Bar #+begin_example This gets lumped in to the above line "Example" #+end_example - Hello * begin quote in lists should work - Example + Uno Lorem #+begin_quote A quote!!! #+end_quote dolor + Dos * tables in lists should work - Example + Table This table: | a | b | | 0 | 1 | | 1 | 2 | - After the table The table should be above * definition lists should work - Example + Hello :: Hola Paragrap continues here #+begin_quote Cuando me desperte, el dinosaurio estaba alli. #+end_quote + Dog :: Perro Paragraph + Last sublist - Another list + with a sublist ruby-org-0.9.12/spec/markdown_examples/comment-trees.md000066400000000000000000000001731257631261400231370ustar00rootroot00000000000000# This headline is in the output # This is in the output ## Yet, this is in the output and this is also part of the output ruby-org-0.9.12/spec/markdown_examples/comment-trees.org000066400000000000000000000006001257631261400233210ustar00rootroot00000000000000* This headline is in the output * COMMENT Commented headline should not be in the output This should not be in the output either. ** This should not be in the output. *** Neither this **** nor this ** Not in the output * This is in the output ** COMMENT But this is not This is not in the output *** Neither is this ** Yet, this is in the output and this is also part of the output ruby-org-0.9.12/spec/markdown_examples/custom-seq-todo.md000066400000000000000000000011311257631261400234130ustar00rootroot00000000000000 I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) # Sample * State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. * State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? # this one's in progress # who am I waiting on? # Finished this one! # I gave up here. # DONT be fooled by just a random word in all caps. # todo <== this word doesn't match because the case doesn't match. # TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/markdown_examples/custom-seq-todo.org000066400000000000000000000014731257631261400236130ustar00rootroot00000000000000#+TITLE: custom-todo.org #+DESCRIPTION: Makes sure I can handle custom todo entries #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+OPTIONS: todo:t I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) * TODO Sample - State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. - State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? * INPROGRESS this one's in progress * WAITING who am I waiting on? * DONE Finished this one! * CANCELED I gave up here. * DONT be fooled by just a random word in all caps. * todo <== this word doesn't match because the case doesn't match. * TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/markdown_examples/custom-todo.md000066400000000000000000000011311257631261400226250ustar00rootroot00000000000000 I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) # Sample * State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. * State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? # this one's in progress # who am I waiting on? # Finished this one! # I gave up here. # DONT be fooled by just a random word in all caps. # todo <== this word doesn't match because the case doesn't match. # TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/markdown_examples/custom-todo.org000066400000000000000000000014671257631261400230300ustar00rootroot00000000000000#+TITLE: custom-todo.org #+DESCRIPTION: Makes sure I can handle custom todo entries #+TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+OPTIONS: todo:t I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) * TODO Sample - State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. - State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? * INPROGRESS this one's in progress * WAITING who am I waiting on? * DONE Finished this one! * CANCELED I gave up here. * DONT be fooled by just a random word in all caps. * todo <== this word doesn't match because the case doesn't match. * TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/markdown_examples/custom-typ-todo.md000066400000000000000000000011311257631261400234370ustar00rootroot00000000000000 I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) # Sample * State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. * State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? # this one's in progress # who am I waiting on? # Finished this one! # I gave up here. # DONT be fooled by just a random word in all caps. # todo <== this word doesn't match because the case doesn't match. # TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/markdown_examples/custom-typ-todo.org000066400000000000000000000014731257631261400236370ustar00rootroot00000000000000#+TITLE: custom-todo.org #+DESCRIPTION: Makes sure I can handle custom todo entries #+TYP_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+OPTIONS: todo:t I copied this todo sequence from Worg. It shows a lot of power of the built-in todo functionality. Now, let's make sure all of these are recognized (and therefore NOT exported.) * TODO Sample - State "CANCELED" from "INPROGRESS" [2009-12-29 Tue 22:26] \\ I gave up. - State "WAITING" from "" [2009-12-29 Tue 22:25] \\ huh? * INPROGRESS this one's in progress * WAITING who am I waiting on? * DONE Finished this one! * CANCELED I gave up here. * DONT be fooled by just a random word in all caps. * todo <== this word doesn't match because the case doesn't match. * TODOX don't be fooled by the initial substring above! ruby-org-0.9.12/spec/markdown_examples/deflist.md000066400000000000000000000024321257631261400220070ustar00rootroot00000000000000 a :: hello b :: world Text # Asterisk can be used for lists One :: The first number. Two :: The second number. Three :: The second number. # Corner cases of definition lists The following examples show how org-ruby behave when handling some cases of definition lists. (Many thanks to [vonavi](https://github.com/vonavi) for his contributions here) ## Definition List Items * Regular list Key :: Value (k1) Key :: Value (k2) Key :: Value (k3) * Semicolon as part of key K::e::y :: Value (k1) K::e::y :: Value (k2) * Paragraph break after key Key :: Value (k1) Key :: Value (k2) * Many semicolons in same line Key :: Value :: Still value (k1) Key :: Value :: Still value (k2) * Semicolon placement cases * Case 1 Key ::MoreKey :: Value (k1) * Case 2 Key:: MoreKey :: Value (k2) * Case 3 :: Key :: Value (k3) ## Not Definition List Items The following cases will not be considered as definition lists but just regular lists. * Key:: Value (n1) * Key ::Value (n2) * Key::Value (n3) * Key:: Value (n4) * Key :: Value (n5) ## Definition List Item without Definition ??? will be shown in this case * Example list Key :: Value :: Still value (k1) Paragraph :: with :: no value Key :: Value :: Still value (k1) :: Paragraph :: with :: no value :: :: Paragraph :: with :: no value ruby-org-0.9.12/spec/markdown_examples/deflist.org000066400000000000000000000025641257631261400222040ustar00rootroot00000000000000#+TITLE: Hallo - a :: hello - b :: world Text * Asterisk can be used for lists * One :: The first number. * Two :: The second number. * Three :: The second number. * Corner cases of definition lists The following examples show how org-ruby behave when handling some cases of definition lists. (Many thanks to [[https://github.com/vonavi][vonavi]] for his contributions here) ** Definition List Items - Regular list + Key :: Value (k1) + Key :: Value (k2) + Key :: Value (k3) - Semicolon as part of key - K::e::y :: Value (k1) - K::e::y :: Value (k2) - Paragraph break after key + Key :: Value (k1) + Key :: Value (k2) - Many semicolons in same line + Key :: Value :: Still value (k1) + Key :: Value :: Still value (k2) - Semicolon placement cases + Case 1 * Key ::MoreKey :: Value (k1) + Case 2 * Key:: MoreKey :: Value (k2) + Case 3 * :: Key :: Value (k3) ** Not Definition List Items The following cases will not be considered as definition lists but just regular lists. - Key:: Value (n1) - Key ::Value (n2) - Key::Value (n3) - Key:: Value (n4) - Key :: Value (n5) ** Definition List Item without Definition ??? will be shown in this case - Example list + Key :: Value :: Still value (k1) Paragraph :: with :: no value + Key :: Value :: Still value (k1) :: Paragraph :: with :: no value :: + :: Paragraph :: with :: no value ruby-org-0.9.12/spec/markdown_examples/emphasis.md000066400000000000000000001212461257631261400221730ustar00rootroot00000000000000# Inline Formatting test for emphasis ## Simple feature test **bold** *italic* `code` `verbatim` *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) http://www.gmail.com [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ## All together in one line **bold** *italic* `code` `verbatim` *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) http://www.gmail.com [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ## Within code test ``` emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} ``` ## Mixed together test ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} ``` **Answer: *42** * **Answer: *42*** *Answer: *42* * **Answer: /42/** *Answer: `42` * **Answer: =42=** *Answer: `42` * **Answer: ~42~** *Answer: *42* * **Answer: _42_** *Answer: ~~42~~ * **Answer: +42+** /Answer: **42** / *Answer: *42** *Answer: /42* / *Answer: /42/* /Answer: `42` / *Answer: =42=* /Answer: `42` / *Answer: ~42~* /Answer: *42* / *Answer: _42_* /Answer: ~~42~~ / *Answer: +42+* =Answer: **42** = `Answer: *42*` =Answer: *42* = `Answer: /42/` `Answer: =42` = `Answer: =42=` =Answer: `42` = `Answer: ~42~` =Answer: *42* = `Answer: _42_` =Answer: ~~42~~ = `Answer: +42+` ~Answer: **42** ~ `Answer: *42*` ~Answer: *42* ~ `Answer: /42/` ~Answer: `42` ~ `Answer: =42=` `Answer: ~42` ~ `Answer: ~42~` ~Answer: *42* ~ `Answer: _42_` ~Answer: ~~42~~ ~ `Answer: +42+` _Answer: **42** _ *Answer: *42** _Answer: *42* _ *Answer: /42/* _Answer: `42` _ *Answer: =42=* _Answer: `42` _ *Answer: ~42~* *Answer: _42* _ *Answer: _42_* _Answer: ~~42~~ _ *Answer: +42+* +Answer: **42** + ~~Answer: *42*~~ +Answer: *42* + ~~Answer: /42/~~ +Answer: `42` + ~~Answer: =42=~~ +Answer: `42` + ~~Answer: ~42~~~ +Answer: *42* + ~~Answer: _42_~~ ~~Answer: +42~~ + ~~Answer: +42+~~ ## Multiline support test :: one line ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} ``` **Starting the line here *and continuing here to close*** **Starting the line here /and continuing here to close/** **Starting the line here =and continuing here to close=** **Starting the line here ~and continuing here to close~** **Starting the line here _and continuing here to close_** **Starting the line here +and continuing here to close+** *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* `Starting the line here *and continuing here to close*` `Starting the line here /and continuing here to close/` `Starting the line here =and continuing here to close=` `Starting the line here ~and continuing here to close~` `Starting the line here _and continuing here to close_` `Starting the line here +and continuing here to close+` `Starting the line here *and continuing here to close*` `Starting the line here /and continuing here to close/` `Starting the line here =and continuing here to close=` `Starting the line here ~and continuing here to close~` `Starting the line here _and continuing here to close_` `Starting the line here +and continuing here to close+` *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* ~~Starting the line here *and continuing here to close*~~ ~~Starting the line here /and continuing here to close/~~ ~~Starting the line here =and continuing here to close=~~ ~~Starting the line here ~and continuing here to close~~~ ~~Starting the line here _and continuing here to close_~~ ~~Starting the line here +and continuing here to close+~~ ## Multiline support test :: two lines ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} ``` *Starting the line here **and continuing here to close*** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here *and continuing here to close/* /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here `and continuing here to close=` =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here `and continuing here to close~` ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here *and continuing here to close_* _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here ~~and continuing here to close+~~ ## Together in same paragraph test **bold** **bold** **bold** *italic* **bold** *italic* `code` **bold** `code` `verbatim` **bold** `verbatim` *underline* **bold** *underline* ~~strikethrough~~ **bold** ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) **bold** [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) **bold** [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) **bold** [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) **bold** ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) **bold** *italic* **bold** *italic* *italic* *italic* `code` *italic* `code` `verbatim` *italic* `verbatim` *underline* *italic* *underline* ~~strikethrough~~ *italic* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) *italic* [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) *italic* [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) *italic* [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *italic* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *italic* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) *italic* [http://www.google.com](http://www.google.com) **bold** `code` **bold** *italic* `code` *italic* `code` `code` `code` `verbatim` `code` `verbatim` *underline* `code` *underline* ~~strikethrough~~ `code` ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) `code` [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) `code` [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) `code` [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) `code` [http://www.google.com](http://www.google.com) **bold** `verbatim` **bold** *italic* `verbatim` *italic* `code` `verbatim` `code` `verbatim` `verbatim` `verbatim` *underline* `verbatim` *underline* ~~strikethrough~~ `verbatim` ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) `verbatim` [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) `verbatim` [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) `verbatim` [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) `verbatim` [http://www.google.com](http://www.google.com) **bold** *underline* **bold** *italic* *underline* *italic* `code` *underline* `code` `verbatim` *underline* `verbatim` *underline* *underline* *underline* ~~strikethrough~~ *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) *underline* [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) *underline* [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) *underline* [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) *underline* [http://www.google.com](http://www.google.com) **bold** ~~strikethrough~~ **bold** *italic* ~~strikethrough~~ *italic* `code` ~~strikethrough~~ `code` `verbatim` ~~strikethrough~~ `verbatim` *underline* ~~strikethrough~~ *underline* ~~strikethrough~~ ~~strikethrough~~ ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) ~~strikethrough~~ [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.google.com](http://www.google.com) **bold** [http://www.bing.com](http://www.bing.com) **bold** *italic* [http://www.bing.com](http://www.bing.com) *italic* `code` [http://www.bing.com](http://www.bing.com) `code` `verbatim` [http://www.bing.com](http://www.bing.com) `verbatim` *underline* [http://www.bing.com](http://www.bing.com) *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) **bold** *italic* [http://www.google.com](http://www.google.com) *italic* `code` [http://www.google.com](http://www.google.com) `code` `verbatim` [http://www.google.com](http://www.google.com) `verbatim` *underline* [http://www.google.com](http://www.google.com) *underline* ~~strikethrough~~ [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) **bold** [helpful text link](http://www.xkcd.com) **bold** *italic* [helpful text link](http://www.xkcd.com) *italic* `code` [helpful text link](http://www.xkcd.com) `code` `verbatim` [helpful text link](http://www.xkcd.com) `verbatim` *underline* [helpful text link](http://www.xkcd.com) *underline* ~~strikethrough~~ [helpful text link](http://www.xkcd.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) **bold** [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) **bold** *italic* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *italic* `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) **bold** ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) **bold** *italic* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *italic* `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) **bold** *italic* [http://www.google.com](http://www.google.com) *italic* `code` [http://www.google.com](http://www.google.com) `code` `verbatim` [http://www.google.com](http://www.google.com) `verbatim` *underline* [http://www.google.com](http://www.google.com) *underline* ~~strikethrough~~ [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) ## Together within a table | **bold** **bold** | *italic* **bold** | `code` **bold** | `verbatim` **bold** | *underline* **bold** | ~~strikethrough~~ **bold** | [http://www.bing.com](http://www.bing.com) **bold** | [http://www.google.com](http://www.google.com) **bold** | [helpful text link](http://www.xkcd.com) **bold** | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) **bold** | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) **bold** | [http://www.google.com](http://www.google.com) **bold** | | **bold** *italic* | *italic* *italic* | `code` *italic* | `verbatim` *italic* | *underline* *italic* | ~~strikethrough~~ *italic* | [http://www.bing.com](http://www.bing.com) *italic* | [http://www.google.com](http://www.google.com) *italic* | [helpful text link](http://www.xkcd.com) *italic* | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *italic* | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *italic* | [http://www.google.com](http://www.google.com) *italic* | | **bold** `code` | *italic* `code` | `code` `code` | `verbatim` `code` | *underline* `code` | ~~strikethrough~~ `code` | [http://www.bing.com](http://www.bing.com) `code` | [http://www.google.com](http://www.google.com) `code` | [helpful text link](http://www.xkcd.com) `code` | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` | [http://www.google.com](http://www.google.com) `code` | | **bold** `verbatim` | *italic* `verbatim` | `code` `verbatim` | `verbatim` `verbatim` | *underline* `verbatim` | ~~strikethrough~~ `verbatim` | [http://www.bing.com](http://www.bing.com) `verbatim` | [http://www.google.com](http://www.google.com) `verbatim` | [helpful text link](http://www.xkcd.com) `verbatim` | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` | [http://www.google.com](http://www.google.com) `verbatim` | | **bold** *underline* | *italic* *underline* | `code` *underline* | `verbatim` *underline* | *underline* *underline* | ~~strikethrough~~ *underline* | [http://www.bing.com](http://www.bing.com) *underline* | [http://www.google.com](http://www.google.com) *underline* | [helpful text link](http://www.xkcd.com) *underline* | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* | [http://www.google.com](http://www.google.com) *underline* | | **bold** ~~strikethrough~~ | *italic* ~~strikethrough~~ | `code` ~~strikethrough~~ | `verbatim` ~~strikethrough~~ | *underline* ~~strikethrough~~ | ~~strikethrough~~ ~~strikethrough~~ | [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ | [http://www.google.com](http://www.google.com) ~~strikethrough~~ | [helpful text link](http://www.xkcd.com) ~~strikethrough~~ | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ | [http://www.google.com](http://www.google.com) ~~strikethrough~~ | | **bold** [http://www.bing.com](http://www.bing.com) | *italic* [http://www.bing.com](http://www.bing.com) | `code` [http://www.bing.com](http://www.bing.com) | `verbatim` [http://www.bing.com](http://www.bing.com) | *underline* [http://www.bing.com](http://www.bing.com) | ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) | [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) | [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) | [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) | [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) | | **bold** [http://www.google.com](http://www.google.com) | *italic* [http://www.google.com](http://www.google.com) | `code` [http://www.google.com](http://www.google.com) | `verbatim` [http://www.google.com](http://www.google.com) | *underline* [http://www.google.com](http://www.google.com) | ~~strikethrough~~ [http://www.google.com](http://www.google.com) | [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | | **bold** [helpful text link](http://www.xkcd.com) | *italic* [helpful text link](http://www.xkcd.com) | `code` [helpful text link](http://www.xkcd.com) | `verbatim` [helpful text link](http://www.xkcd.com) | *underline* [helpful text link](http://www.xkcd.com) | ~~strikethrough~~ [helpful text link](http://www.xkcd.com) | [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) | [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) | [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) | [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) | | **bold** [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | *italic* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | | **bold** ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | *italic* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | | **bold** [http://www.google.com](http://www.google.com) | *italic* [http://www.google.com](http://www.google.com) | `code` [http://www.google.com](http://www.google.com) | `verbatim` [http://www.google.com](http://www.google.com) | *underline* [http://www.google.com](http://www.google.com) | ~~strikethrough~~ [http://www.google.com](http://www.google.com) | [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | ruby-org-0.9.12/spec/markdown_examples/emphasis.org000066400000000000000000000777521257631261400223760ustar00rootroot00000000000000* Inline Formatting test for emphasis ** Simple feature test *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** All together in one line *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Within code test #+begin_example emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} #+end_example ** Mixed together test #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} #+end_example *Answer: *42* * *Answer: *42** *Answer: /42/ * *Answer: /42/* *Answer: =42= * *Answer: =42=* *Answer: ~42~ * *Answer: ~42~* *Answer: _42_ * *Answer: _42_* *Answer: +42+ * *Answer: +42+* /Answer: *42* / /Answer: *42*/ /Answer: /42/ / /Answer: /42// /Answer: =42= / /Answer: =42=/ /Answer: ~42~ / /Answer: ~42~/ /Answer: _42_ / /Answer: _42_/ /Answer: +42+ / /Answer: +42+/ =Answer: *42* = =Answer: *42*= =Answer: /42/ = =Answer: /42/= =Answer: =42= = =Answer: =42== =Answer: ~42~ = =Answer: ~42~= =Answer: _42_ = =Answer: _42_= =Answer: +42+ = =Answer: +42+= ~Answer: *42* ~ ~Answer: *42*~ ~Answer: /42/ ~ ~Answer: /42/~ ~Answer: =42= ~ ~Answer: =42=~ ~Answer: ~42~ ~ ~Answer: ~42~~ ~Answer: _42_ ~ ~Answer: _42_~ ~Answer: +42+ ~ ~Answer: +42+~ _Answer: *42* _ _Answer: *42*_ _Answer: /42/ _ _Answer: /42/_ _Answer: =42= _ _Answer: =42=_ _Answer: ~42~ _ _Answer: ~42~_ _Answer: _42_ _ _Answer: _42__ _Answer: +42+ _ _Answer: +42+_ +Answer: *42* + +Answer: *42*+ +Answer: /42/ + +Answer: /42/+ +Answer: =42= + +Answer: =42=+ +Answer: ~42~ + +Answer: ~42~+ +Answer: _42_ + +Answer: _42_+ +Answer: +42+ + +Answer: +42++ ** Multiline support test :: one line #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Multiline support test :: two lines #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Together in same paragraph test *bold* *bold* *bold* /italic/ *bold* /italic/ =code= *bold* =code= ~verbatim~ *bold* ~verbatim~ _underline_ *bold* _underline_ +strikethrough+ *bold* +strikethrough+ [[http://www.bing.com]] *bold* [[http://www.bing.com]] [[http://www.google.com]] *bold* [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ *bold* /italic/ /italic/ /italic/ =code= /italic/ =code= ~verbatim~ /italic/ ~verbatim~ _underline_ /italic/ _underline_ +strikethrough+ /italic/ +strikethrough+ [[http://www.bing.com]] /italic/ [[http://www.bing.com]] [[http://www.google.com]] /italic/ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] /italic/ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ *bold* =code= *bold* /italic/ =code= /italic/ =code= =code= =code= ~verbatim~ =code= ~verbatim~ _underline_ =code= _underline_ +strikethrough+ =code= +strikethrough+ [[http://www.bing.com]] =code= [[http://www.bing.com]] [[http://www.google.com]] =code= [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] =code= [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= *bold* ~verbatim~ *bold* /italic/ ~verbatim~ /italic/ =code= ~verbatim~ =code= ~verbatim~ ~verbatim~ ~verbatim~ _underline_ ~verbatim~ _underline_ +strikethrough+ ~verbatim~ +strikethrough+ [[http://www.bing.com]] ~verbatim~ [[http://www.bing.com]] [[http://www.google.com]] ~verbatim~ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] ~verbatim~ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ *bold* _underline_ *bold* /italic/ _underline_ /italic/ =code= _underline_ =code= ~verbatim~ _underline_ ~verbatim~ _underline_ _underline_ _underline_ +strikethrough+ _underline_ +strikethrough+ [[http://www.bing.com]] _underline_ [[http://www.bing.com]] [[http://www.google.com]] _underline_ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] _underline_ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ *bold* +strikethrough+ *bold* /italic/ +strikethrough+ /italic/ =code= +strikethrough+ =code= ~verbatim~ +strikethrough+ ~verbatim~ _underline_ +strikethrough+ _underline_ +strikethrough+ +strikethrough+ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] +strikethrough+ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ *bold* [[http://www.bing.com]] *bold* /italic/ [[http://www.bing.com]] /italic/ =code= [[http://www.bing.com]] =code= ~verbatim~ [[http://www.bing.com]] ~verbatim~ _underline_ [[http://www.bing.com]] _underline_ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] *bold* [[http://www.google.com]] *bold* /italic/ [[http://www.google.com]] /italic/ =code= [[http://www.google.com]] =code= ~verbatim~ [[http://www.google.com]] ~verbatim~ _underline_ [[http://www.google.com]] _underline_ +strikethrough+ [[http://www.google.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] *bold* [[http://www.xkcd.com][helpful text link]] *bold* /italic/ [[http://www.xkcd.com][helpful text link]] /italic/ =code= [[http://www.xkcd.com][helpful text link]] =code= ~verbatim~ [[http://www.xkcd.com][helpful text link]] ~verbatim~ _underline_ [[http://www.xkcd.com][helpful text link]] _underline_ +strikethrough+ [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ /italic/ =code= =code= ~verbatim~ ~verbatim~ _underline_ _underline_ +strikethrough+ +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Together within a table | *bold* *bold* | /italic/ *bold* | =code= *bold* | ~verbatim~ *bold* | _underline_ *bold* | +strikethrough+ *bold* | [[http://www.bing.com]] *bold* | [[http://www.google.com]] *bold* | [[http://www.xkcd.com][helpful text link]] *bold* | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* | *bold* | | *bold* /italic/ | /italic/ /italic/ | =code= /italic/ | ~verbatim~ /italic/ | _underline_ /italic/ | +strikethrough+ /italic/ | [[http://www.bing.com]] /italic/ | [[http://www.google.com]] /italic/ | [[http://www.xkcd.com][helpful text link]] /italic/ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ | /italic/ | | *bold* =code= | /italic/ =code= | =code= =code= | ~verbatim~ =code= | _underline_ =code= | +strikethrough+ =code= | [[http://www.bing.com]] =code= | [[http://www.google.com]] =code= | [[http://www.xkcd.com][helpful text link]] =code= | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= | =code= | | *bold* ~verbatim~ | /italic/ ~verbatim~ | =code= ~verbatim~ | ~verbatim~ ~verbatim~ | _underline_ ~verbatim~ | +strikethrough+ ~verbatim~ | [[http://www.bing.com]] ~verbatim~ | [[http://www.google.com]] ~verbatim~ | [[http://www.xkcd.com][helpful text link]] ~verbatim~ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ | ~verbatim~ | | *bold* _underline_ | /italic/ _underline_ | =code= _underline_ | ~verbatim~ _underline_ | _underline_ _underline_ | +strikethrough+ _underline_ | [[http://www.bing.com]] _underline_ | [[http://www.google.com]] _underline_ | [[http://www.xkcd.com][helpful text link]] _underline_ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ | _underline_ | | *bold* +strikethrough+ | /italic/ +strikethrough+ | =code= +strikethrough+ | ~verbatim~ +strikethrough+ | _underline_ +strikethrough+ | +strikethrough+ +strikethrough+ | [[http://www.bing.com]] +strikethrough+ | [[http://www.google.com]] +strikethrough+ | [[http://www.xkcd.com][helpful text link]] +strikethrough+ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ | +strikethrough+ | | *bold* [[http://www.bing.com]] | /italic/ [[http://www.bing.com]] | =code= [[http://www.bing.com]] | ~verbatim~ [[http://www.bing.com]] | _underline_ [[http://www.bing.com]] | +strikethrough+ [[http://www.bing.com]] | [[http://www.bing.com]] [[http://www.bing.com]] | [[http://www.google.com]] [[http://www.bing.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] | [[http://www.bing.com]] | | *bold* [[http://www.google.com]] | /italic/ [[http://www.google.com]] | =code= [[http://www.google.com]] | ~verbatim~ [[http://www.google.com]] | _underline_ [[http://www.google.com]] | +strikethrough+ [[http://www.google.com]] | [[http://www.bing.com]] [[http://www.google.com]] | [[http://www.google.com]] [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] | [[http://www.google.com]] | | *bold* [[http://www.xkcd.com][helpful text link]] | /italic/ [[http://www.xkcd.com][helpful text link]] | =code= [[http://www.xkcd.com][helpful text link]] | ~verbatim~ [[http://www.xkcd.com][helpful text link]] | _underline_ [[http://www.xkcd.com][helpful text link]] | +strikethrough+ [[http://www.xkcd.com][helpful text link]] | [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] | | *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | | *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | *bold* | /italic/ | =code= | ~verbatim~ | _underline_ | +strikethrough+ | [[http://www.bing.com]] | [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | ruby-org-0.9.12/spec/markdown_examples/entities.md000066400000000000000000000322631257631261400222060ustar00rootroot00000000000000 `Org-ruby` supports "smart double quotes," 'smart single quotes,' apostrophes for contractions like won't and can't, and other things... like elipses. Oh -- and dashes. * Question: What does org-mode do for ampersands, like R&R? or <? * Answer: Those get escaped, too. ☺ # « They α should β be γ able δ to η exist θ in ε the same line √ ». ``` \laquo They won't appear in in example blocks. \raquo ``` ⌈ — — — — — — ⌉ Though they appear in center blocks ⌊ — — — — — — ⌋ To work they have to be separated, like ♥ ♥, not like ♥\hearts. # List of entities supported ``` # Script to generate the list of currently supported entities require 'org-ruby' Orgmode::HtmlEntities.each_pair do |entity, _| puts "- Writing =\\#{entity}=, results in: \\#{entity}" end ``` ``` bundle exec ruby /tmp/print_entities.rb ``` * Writing `\Agrave`, results in: À * Writing `\agrave`, results in: à * Writing `\Aacute`, results in: à * Writing `\aacute`, results in: á * Writing `\Acirc`, results in:  * Writing `\acirc`, results in: â * Writing `\Atilde`, results in: à * Writing `\atilde`, results in: ã * Writing `\Auml`, results in: Ä * Writing `\auml`, results in: ä * Writing `\Aring`, results in: Ã… * Writing `\AA`, results in: Ã… * Writing `\aring`, results in: Ã¥ * Writing `\AElig`, results in: Æ * Writing `\aelig`, results in: æ * Writing `\Ccedil`, results in: Ç * Writing `\ccedil`, results in: ç * Writing `\Egrave`, results in: È * Writing `\egrave`, results in: è * Writing `\Eacute`, results in: É * Writing `\eacute`, results in: é * Writing `\Ecirc`, results in: Ê * Writing `\ecirc`, results in: ê * Writing `\Euml`, results in: Ë * Writing `\euml`, results in: ë * Writing `\Igrave`, results in: ÃŒ * Writing `\igrave`, results in: ì * Writing `\Iacute`, results in: à * Writing `\iacute`, results in: í * Writing `\Icirc`, results in: ÃŽ * Writing `\icirc`, results in: î * Writing `\Iuml`, results in: à * Writing `\iuml`, results in: ï * Writing `\Ntilde`, results in: Ñ * Writing `\ntilde`, results in: ñ * Writing `\Ograve`, results in: Ã’ * Writing `\ograve`, results in: ò * Writing `\Oacute`, results in: Ó * Writing `\oacute`, results in: ó * Writing `\Ocirc`, results in: Ô * Writing `\ocirc`, results in: ô * Writing `\Otilde`, results in: Õ * Writing `\otilde`, results in: õ * Writing `\Ouml`, results in: Ö * Writing `\ouml`, results in: ö * Writing `\Oslash`, results in: Ø * Writing `\oslash`, results in: ø * Writing `\OElig`, results in: Å’ * Writing `\oelig`, results in: Å“ * Writing `\Scaron`, results in: Å  * Writing `\scaron`, results in: Å¡ * Writing `\szlig`, results in: ß * Writing `\Ugrave`, results in: Ù * Writing `\ugrave`, results in: ù * Writing `\Uacute`, results in: Ú * Writing `\uacute`, results in: ú * Writing `\Ucirc`, results in: Û * Writing `\ucirc`, results in: û * Writing `\Uuml`, results in: Ü * Writing `\uuml`, results in: ü * Writing `\Yacute`, results in: à * Writing `\yacute`, results in: ý * Writing `\Yuml`, results in: Ÿ * Writing `\yuml`, results in: ÿ * Writing `\fnof`, results in: Æ’ * Writing `\real`, results in: ℜ * Writing `\image`, results in: â„‘ * Writing `\weierp`, results in: ℘ * Writing `\Alpha`, results in: Α * Writing `\alpha`, results in: α * Writing `\Beta`, results in: Î’ * Writing `\beta`, results in: β * Writing `\Gamma`, results in: Γ * Writing `\gamma`, results in: γ * Writing `\Delta`, results in: Δ * Writing `\delta`, results in: δ * Writing `\Epsilon`, results in: Ε * Writing `\epsilon`, results in: ε * Writing `\varepsilon`, results in: ε * Writing `\Zeta`, results in: Ζ * Writing `\zeta`, results in: ζ * Writing `\Eta`, results in: Η * Writing `\eta`, results in: η * Writing `\Theta`, results in: Θ * Writing `\theta`, results in: θ * Writing `\thetasym`, results in: Ï‘ * Writing `\vartheta`, results in: Ï‘ * Writing `\Iota`, results in: Ι * Writing `\iota`, results in: ι * Writing `\Kappa`, results in: Κ * Writing `\kappa`, results in: κ * Writing `\Lambda`, results in: Λ * Writing `\lambda`, results in: λ * Writing `\Mu`, results in: Μ * Writing `\mu`, results in: μ * Writing `\nu`, results in: ν * Writing `\Nu`, results in: Î * Writing `\Xi`, results in: Ξ * Writing `\xi`, results in: ξ * Writing `\Omicron`, results in: Ο * Writing `\omicron`, results in: ο * Writing `\Pi`, results in: Π * Writing `\pi`, results in: Ï€ * Writing `\Rho`, results in: Ρ * Writing `\rho`, results in: Ï * Writing `\Sigma`, results in: Σ * Writing `\sigma`, results in: σ * Writing `\sigmaf`, results in: Ï‚ * Writing `\varsigma`, results in: Ï‚ * Writing `\Tau`, results in: Τ * Writing `\Upsilon`, results in: Î¥ * Writing `\upsih`, results in: Ï’ * Writing `\upsilon`, results in: Ï… * Writing `\Phi`, results in: Φ * Writing `\phi`, results in: φ * Writing `\Chi`, results in: Χ * Writing `\chi`, results in: χ * Writing `\acutex`, results in: ð‘¥Ì * Writing `\Psi`, results in: Ψ * Writing `\psi`, results in: ψ * Writing `\tau`, results in: Ï„ * Writing `\Omega`, results in: Ω * Writing `\omega`, results in: ω * Writing `\piv`, results in: Ï– * Writing `\partial`, results in: ∂ * Writing `\alefsym`, results in: ℵ * Writing `\ETH`, results in: à * Writing `\eth`, results in: ð * Writing `\THORN`, results in: Þ * Writing `\thorn`, results in: þ * Writing `\dots`, results in: … * Writing `\hellip`, results in: … * Writing `\middot`, results in: · * Writing `\iexcl`, results in: ¡ * Writing `\iquest`, results in: ¿ * Writing `\shy`, results in: * Writing `\ndash`, results in: – * Writing `\mdash`, results in: — * Writing `\quot`, results in: " * Writing `\acute`, results in: ´ * Writing `\ldquo`, results in: “ * Writing `\rdquo`, results in: †* Writing `\bdquo`, results in: „ * Writing `\lsquo`, results in: ‘ * Writing `\rsquo`, results in: ’ * Writing `\sbquo`, results in: ‚ * Writing `\laquo`, results in: « * Writing `\raquo`, results in: » * Writing `\lsaquo`, results in: ‹ * Writing `\rsaquo`, results in: › * Writing `\circ`, results in: ˆ * Writing `\vert`, results in: | * Writing `\brvbar`, results in: ¦ * Writing `\sect`, results in: § * Writing `\amp`, results in: & * Writing `\lt`, results in: < * Writing `\gt`, results in: > * Writing `\tilde`, results in: ~ * Writing `\slash`, results in: / * Writing `\plus`, results in: + * Writing `\under`, results in: _ * Writing `\equal`, results in: = * Writing `\asciicirc`, results in: ^ * Writing `\dagger`, results in: † * Writing `\Dagger`, results in: ‡ * Writing `\nbsp`, results in: * Writing `\ensp`, results in:   * Writing `\emsp`, results in:   * Writing `\thinsp`, results in:   * Writing `\curren`, results in: ¤ * Writing `\cent`, results in: ¢ * Writing `\pound`, results in: £ * Writing `\yen`, results in: Â¥ * Writing `\euro`, results in: € * Writing `\EUR`, results in: € * Writing `\EURdig`, results in: € * Writing `\EURhv`, results in: € * Writing `\EURcr`, results in: € * Writing `\EURtm`, results in: € * Writing `\copy`, results in: © * Writing `\reg`, results in: ® * Writing `\trade`, results in: â„¢ * Writing `\minus`, results in: − * Writing `\pm`, results in: ± * Writing `\plusmn`, results in: ± * Writing `\times`, results in: × * Writing `\frasl`, results in: â„ * Writing `\div`, results in: ÷ * Writing `\frac12`, results in: ½ * Writing `\frac14`, results in: ¼ * Writing `\frac34`, results in: ¾ * Writing `\permil`, results in: ‰ * Writing `\sup1`, results in: ¹ * Writing `\sup2`, results in: ² * Writing `\sup3`, results in: ³ * Writing `\radic`, results in: √ * Writing `\sum`, results in: ∑ * Writing `\prod`, results in: ∠* Writing `\micro`, results in: µ * Writing `\macr`, results in: ¯ * Writing `\deg`, results in: ° * Writing `\prime`, results in: ′ * Writing `\Prime`, results in: ″ * Writing `\infin`, results in: ∞ * Writing `\infty`, results in: ∞ * Writing `\prop`, results in: ∠* Writing `\proptp`, results in: ∠* Writing `\not`, results in: ¬ * Writing `\neg`, results in: ¬ * Writing `\land`, results in: ∧ * Writing `\wedge`, results in: ∧ * Writing `\lor`, results in: ∨ * Writing `\vee`, results in: ∨ * Writing `\cap`, results in: ∩ * Writing `\cup`, results in: ∪ * Writing `\int`, results in: ∫ * Writing `\there4`, results in: ∴ * Writing `\sim`, results in: ∼ * Writing `\cong`, results in: ≅ * Writing `\simeq`, results in: ≅ * Writing `\asymp`, results in: ≈ * Writing `\approx`, results in: ≈ * Writing `\ne`, results in: ≠ * Writing `\neq`, results in: ≠ * Writing `\equiv`, results in: ≡ * Writing `\le`, results in: ≤ * Writing `\ge`, results in: ≥ * Writing `\sub`, results in: ⊂ * Writing `\subset`, results in: ⊂ * Writing `\sup`, results in: ⊃ * Writing `\supset`, results in: ⊃ * Writing `\nsub`, results in: ⊄ * Writing `\sube`, results in: ⊆ * Writing `\nsup`, results in: ⊅ * Writing `\supe`, results in: ⊇ * Writing `\forall`, results in: ∀ * Writing `\exist`, results in: ∃ * Writing `\exists`, results in: ∃ * Writing `\empty`, results in: ∅ * Writing `\emptyset`, results in: ∅ * Writing `\isin`, results in: ∈ * Writing `\in`, results in: ∈ * Writing `\notin`, results in: ∉ * Writing `\ni`, results in: ∋ * Writing `\nabla`, results in: ∇ * Writing `\ang`, results in: ∠ * Writing `\angle`, results in: ∠ * Writing `\perp`, results in: ⊥ * Writing `\sdot`, results in: â‹… * Writing `\cdot`, results in: â‹… * Writing `\lceil`, results in: ⌈ * Writing `\rceil`, results in: ⌉ * Writing `\lfloor`, results in: ⌊ * Writing `\rfloor`, results in: ⌋ * Writing `\lang`, results in: ⟨ * Writing `\rang`, results in: ⟩ * Writing `\larr`, results in: ↠* Writing `\leftarrow`, results in: ↠* Writing `\gets`, results in: ↠* Writing `\lArr`, results in: ⇠* Writing `\Leftarrow`, results in: ⇠* Writing `\uarr`, results in: ↑ * Writing `\uparrow`, results in: ↑ * Writing `\uArr`, results in: ⇑ * Writing `\Uparrow`, results in: ⇑ * Writing `\rarr`, results in: → * Writing `\to`, results in: → * Writing `\rightarrow`, results in: → * Writing `\rArr`, results in: ⇒ * Writing `\Rightarrow`, results in: ⇒ * Writing `\darr`, results in: ↓ * Writing `\downarrow`, results in: ↓ * Writing `\dArr`, results in: ⇓ * Writing `\Downarrow`, results in: ⇓ * Writing `\harr`, results in: ↔ * Writing `\leftrightarrow`, results in: ↔ * Writing `\hArr`, results in: ⇔ * Writing `\Leftrightarrow`, results in: ⇔ * Writing `\crarr`, results in: ↵ * Writing `\hookleftarrow`, results in: ↵ * Writing `\arccos`, results in: arccos * Writing `\arcsin`, results in: arcsin * Writing `\arctan`, results in: arctan * Writing `\arg`, results in: arg * Writing `\cos`, results in: cos * Writing `\cosh`, results in: cosh * Writing `\cot`, results in: cot * Writing `\coth`, results in: coth * Writing `\csc`, results in: csc * Writing `\det`, results in: det * Writing `\dim`, results in: dim * Writing `\exp`, results in: exp * Writing `\gcd`, results in: gcd * Writing `\hom`, results in: hom * Writing `\inf`, results in: inf * Writing `\ker`, results in: ker * Writing `\lg`, results in: lg * Writing `\lim`, results in: lim * Writing `\liminf`, results in: liminf * Writing `\limsup`, results in: limsup * Writing `\ln`, results in: ln * Writing `\log`, results in: log * Writing `\max`, results in: max * Writing `\min`, results in: min * Writing `\Pr`, results in: Pr * Writing `\sec`, results in: sec * Writing `\sin`, results in: sin * Writing `\sinh`, results in: sinh * Writing `\tan`, results in: tan * Writing `\tanh`, results in: tanh * Writing `\bull`, results in: • * Writing `\bullet`, results in: • * Writing `\star`, results in: ⋆ * Writing `\lowast`, results in: ∗ * Writing `\ast`, results in: * * Writing `\odot`, results in: ʘ * Writing `\oplus`, results in: ⊕ * Writing `\otimes`, results in: ⊗ * Writing `\checkmark`, results in: ✓ * Writing `\para`, results in: ¶ * Writing `\ordf`, results in: ª * Writing `\ordm`, results in: º * Writing `\cedil`, results in: ¸ * Writing `\oline`, results in: ‾ * Writing `\uml`, results in: ¨ * Writing `\zwnj`, results in: ‌ * Writing `\zwj`, results in: †* Writing `\lrm`, results in: ‎ * Writing `\rlm`, results in: †* Writing `\smile`, results in: ⌣ * Writing `\smiley`, results in: ☺ * Writing `\blacksmile`, results in: ☻ * Writing `\sad`, results in: ☹ * Writing `\clubs`, results in: ♣ * Writing `\clubsuit`, results in: ♣ * Writing `\spades`, results in: â™  * Writing `\spadesuit`, results in: â™  * Writing `\hearts`, results in: ♥ * Writing `\heartsuit`, results in: ♥ * Writing `\diams`, results in: ♦ * Writing `\diamondsuit`, results in: ♦ * Writing `\Diamond`, results in: â‹„ * Writing `\loz`, results in: â—Š # Some special cases In case nothing matches, the string is returned as is. \for \example \this \wont \break ruby-org-0.9.12/spec/markdown_examples/entities.org000066400000000000000000000343251257631261400223760ustar00rootroot00000000000000#+TITLE: ENTITIES =Org-ruby= supports "smart double quotes," 'smart single quotes,' apostrophes for contractions like won't and can't, and other things... like elipses. Oh -- and dashes. - Question: What does org-mode do for ampersands, like R&R? or <? - Answer: Those get escaped, too. \smiley * \laquo They \alpha should \beta be \gamma able \delta to \eta exist \theta in \epsilon the same line \radic \raquo. #+begin_example \laquo They won't appear in in example blocks. \raquo #+end_example #+begin_center \lceil \mdash \mdash \mdash \mdash \mdash \mdash \rceil Though they appear in center blocks \lfloor \mdash \mdash \mdash \mdash \mdash \mdash \rfloor #+end_center To work they have to be separated, like \hearts \hearts, not like \hearts\hearts. * List of entities supported #+begin_example :tangle /tmp/print_entities.rb # Script to generate the list of currently supported entities require 'org-ruby' Orgmode::HtmlEntities.each_pair do |entity, _| puts "- Writing =\\#{entity}=, results in: \\#{entity}" end #+end_example #+begin_example :results output bundle exec ruby /tmp/print_entities.rb #+end_example - Writing =\Agrave=, results in: \Agrave - Writing =\agrave=, results in: \agrave - Writing =\Aacute=, results in: \Aacute - Writing =\aacute=, results in: \aacute - Writing =\Acirc=, results in: \Acirc - Writing =\acirc=, results in: \acirc - Writing =\Atilde=, results in: \Atilde - Writing =\atilde=, results in: \atilde - Writing =\Auml=, results in: \Auml - Writing =\auml=, results in: \auml - Writing =\Aring=, results in: \Aring - Writing =\AA=, results in: \AA - Writing =\aring=, results in: \aring - Writing =\AElig=, results in: \AElig - Writing =\aelig=, results in: \aelig - Writing =\Ccedil=, results in: \Ccedil - Writing =\ccedil=, results in: \ccedil - Writing =\Egrave=, results in: \Egrave - Writing =\egrave=, results in: \egrave - Writing =\Eacute=, results in: \Eacute - Writing =\eacute=, results in: \eacute - Writing =\Ecirc=, results in: \Ecirc - Writing =\ecirc=, results in: \ecirc - Writing =\Euml=, results in: \Euml - Writing =\euml=, results in: \euml - Writing =\Igrave=, results in: \Igrave - Writing =\igrave=, results in: \igrave - Writing =\Iacute=, results in: \Iacute - Writing =\iacute=, results in: \iacute - Writing =\Icirc=, results in: \Icirc - Writing =\icirc=, results in: \icirc - Writing =\Iuml=, results in: \Iuml - Writing =\iuml=, results in: \iuml - Writing =\Ntilde=, results in: \Ntilde - Writing =\ntilde=, results in: \ntilde - Writing =\Ograve=, results in: \Ograve - Writing =\ograve=, results in: \ograve - Writing =\Oacute=, results in: \Oacute - Writing =\oacute=, results in: \oacute - Writing =\Ocirc=, results in: \Ocirc - Writing =\ocirc=, results in: \ocirc - Writing =\Otilde=, results in: \Otilde - Writing =\otilde=, results in: \otilde - Writing =\Ouml=, results in: \Ouml - Writing =\ouml=, results in: \ouml - Writing =\Oslash=, results in: \Oslash - Writing =\oslash=, results in: \oslash - Writing =\OElig=, results in: \OElig - Writing =\oelig=, results in: \oelig - Writing =\Scaron=, results in: \Scaron - Writing =\scaron=, results in: \scaron - Writing =\szlig=, results in: \szlig - Writing =\Ugrave=, results in: \Ugrave - Writing =\ugrave=, results in: \ugrave - Writing =\Uacute=, results in: \Uacute - Writing =\uacute=, results in: \uacute - Writing =\Ucirc=, results in: \Ucirc - Writing =\ucirc=, results in: \ucirc - Writing =\Uuml=, results in: \Uuml - Writing =\uuml=, results in: \uuml - Writing =\Yacute=, results in: \Yacute - Writing =\yacute=, results in: \yacute - Writing =\Yuml=, results in: \Yuml - Writing =\yuml=, results in: \yuml - Writing =\fnof=, results in: \fnof - Writing =\real=, results in: \real - Writing =\image=, results in: \image - Writing =\weierp=, results in: \weierp - Writing =\Alpha=, results in: \Alpha - Writing =\alpha=, results in: \alpha - Writing =\Beta=, results in: \Beta - Writing =\beta=, results in: \beta - Writing =\Gamma=, results in: \Gamma - Writing =\gamma=, results in: \gamma - Writing =\Delta=, results in: \Delta - Writing =\delta=, results in: \delta - Writing =\Epsilon=, results in: \Epsilon - Writing =\epsilon=, results in: \epsilon - Writing =\varepsilon=, results in: \varepsilon - Writing =\Zeta=, results in: \Zeta - Writing =\zeta=, results in: \zeta - Writing =\Eta=, results in: \Eta - Writing =\eta=, results in: \eta - Writing =\Theta=, results in: \Theta - Writing =\theta=, results in: \theta - Writing =\thetasym=, results in: \thetasym - Writing =\vartheta=, results in: \vartheta - Writing =\Iota=, results in: \Iota - Writing =\iota=, results in: \iota - Writing =\Kappa=, results in: \Kappa - Writing =\kappa=, results in: \kappa - Writing =\Lambda=, results in: \Lambda - Writing =\lambda=, results in: \lambda - Writing =\Mu=, results in: \Mu - Writing =\mu=, results in: \mu - Writing =\nu=, results in: \nu - Writing =\Nu=, results in: \Nu - Writing =\Xi=, results in: \Xi - Writing =\xi=, results in: \xi - Writing =\Omicron=, results in: \Omicron - Writing =\omicron=, results in: \omicron - Writing =\Pi=, results in: \Pi - Writing =\pi=, results in: \pi - Writing =\Rho=, results in: \Rho - Writing =\rho=, results in: \rho - Writing =\Sigma=, results in: \Sigma - Writing =\sigma=, results in: \sigma - Writing =\sigmaf=, results in: \sigmaf - Writing =\varsigma=, results in: \varsigma - Writing =\Tau=, results in: \Tau - Writing =\Upsilon=, results in: \Upsilon - Writing =\upsih=, results in: \upsih - Writing =\upsilon=, results in: \upsilon - Writing =\Phi=, results in: \Phi - Writing =\phi=, results in: \phi - Writing =\Chi=, results in: \Chi - Writing =\chi=, results in: \chi - Writing =\acutex=, results in: \acutex - Writing =\Psi=, results in: \Psi - Writing =\psi=, results in: \psi - Writing =\tau=, results in: \tau - Writing =\Omega=, results in: \Omega - Writing =\omega=, results in: \omega - Writing =\piv=, results in: \piv - Writing =\partial=, results in: \partial - Writing =\alefsym=, results in: \alefsym - Writing =\ETH=, results in: \ETH - Writing =\eth=, results in: \eth - Writing =\THORN=, results in: \THORN - Writing =\thorn=, results in: \thorn - Writing =\dots=, results in: \dots - Writing =\hellip=, results in: \hellip - Writing =\middot=, results in: \middot - Writing =\iexcl=, results in: \iexcl - Writing =\iquest=, results in: \iquest - Writing =\shy=, results in: \shy - Writing =\ndash=, results in: \ndash - Writing =\mdash=, results in: \mdash - Writing =\quot=, results in: \quot - Writing =\acute=, results in: \acute - Writing =\ldquo=, results in: \ldquo - Writing =\rdquo=, results in: \rdquo - Writing =\bdquo=, results in: \bdquo - Writing =\lsquo=, results in: \lsquo - Writing =\rsquo=, results in: \rsquo - Writing =\sbquo=, results in: \sbquo - Writing =\laquo=, results in: \laquo - Writing =\raquo=, results in: \raquo - Writing =\lsaquo=, results in: \lsaquo - Writing =\rsaquo=, results in: \rsaquo - Writing =\circ=, results in: \circ - Writing =\vert=, results in: \vert - Writing =\brvbar=, results in: \brvbar - Writing =\sect=, results in: \sect - Writing =\amp=, results in: \amp - Writing =\lt=, results in: \lt - Writing =\gt=, results in: \gt - Writing =\tilde=, results in: \tilde - Writing =\slash=, results in: \slash - Writing =\plus=, results in: \plus - Writing =\under=, results in: \under - Writing =\equal=, results in: \equal - Writing =\asciicirc=, results in: \asciicirc - Writing =\dagger=, results in: \dagger - Writing =\Dagger=, results in: \Dagger - Writing =\nbsp=, results in: \nbsp - Writing =\ensp=, results in: \ensp - Writing =\emsp=, results in: \emsp - Writing =\thinsp=, results in: \thinsp - Writing =\curren=, results in: \curren - Writing =\cent=, results in: \cent - Writing =\pound=, results in: \pound - Writing =\yen=, results in: \yen - Writing =\euro=, results in: \euro - Writing =\EUR=, results in: \EUR - Writing =\EURdig=, results in: \EURdig - Writing =\EURhv=, results in: \EURhv - Writing =\EURcr=, results in: \EURcr - Writing =\EURtm=, results in: \EURtm - Writing =\copy=, results in: \copy - Writing =\reg=, results in: \reg - Writing =\trade=, results in: \trade - Writing =\minus=, results in: \minus - Writing =\pm=, results in: \pm - Writing =\plusmn=, results in: \plusmn - Writing =\times=, results in: \times - Writing =\frasl=, results in: \frasl - Writing =\div=, results in: \div - Writing =\frac12=, results in: \frac12 - Writing =\frac14=, results in: \frac14 - Writing =\frac34=, results in: \frac34 - Writing =\permil=, results in: \permil - Writing =\sup1=, results in: \sup1 - Writing =\sup2=, results in: \sup2 - Writing =\sup3=, results in: \sup3 - Writing =\radic=, results in: \radic - Writing =\sum=, results in: \sum - Writing =\prod=, results in: \prod - Writing =\micro=, results in: \micro - Writing =\macr=, results in: \macr - Writing =\deg=, results in: \deg - Writing =\prime=, results in: \prime - Writing =\Prime=, results in: \Prime - Writing =\infin=, results in: \infin - Writing =\infty=, results in: \infty - Writing =\prop=, results in: \prop - Writing =\proptp=, results in: \proptp - Writing =\not=, results in: \not - Writing =\neg=, results in: \neg - Writing =\land=, results in: \land - Writing =\wedge=, results in: \wedge - Writing =\lor=, results in: \lor - Writing =\vee=, results in: \vee - Writing =\cap=, results in: \cap - Writing =\cup=, results in: \cup - Writing =\int=, results in: \int - Writing =\there4=, results in: \there4 - Writing =\sim=, results in: \sim - Writing =\cong=, results in: \cong - Writing =\simeq=, results in: \simeq - Writing =\asymp=, results in: \asymp - Writing =\approx=, results in: \approx - Writing =\ne=, results in: \ne - Writing =\neq=, results in: \neq - Writing =\equiv=, results in: \equiv - Writing =\le=, results in: \le - Writing =\ge=, results in: \ge - Writing =\sub=, results in: \sub - Writing =\subset=, results in: \subset - Writing =\sup=, results in: \sup - Writing =\supset=, results in: \supset - Writing =\nsub=, results in: \nsub - Writing =\sube=, results in: \sube - Writing =\nsup=, results in: \nsup - Writing =\supe=, results in: \supe - Writing =\forall=, results in: \forall - Writing =\exist=, results in: \exist - Writing =\exists=, results in: \exists - Writing =\empty=, results in: \empty - Writing =\emptyset=, results in: \emptyset - Writing =\isin=, results in: \isin - Writing =\in=, results in: \in - Writing =\notin=, results in: \notin - Writing =\ni=, results in: \ni - Writing =\nabla=, results in: \nabla - Writing =\ang=, results in: \ang - Writing =\angle=, results in: \angle - Writing =\perp=, results in: \perp - Writing =\sdot=, results in: \sdot - Writing =\cdot=, results in: \cdot - Writing =\lceil=, results in: \lceil - Writing =\rceil=, results in: \rceil - Writing =\lfloor=, results in: \lfloor - Writing =\rfloor=, results in: \rfloor - Writing =\lang=, results in: \lang - Writing =\rang=, results in: \rang - Writing =\larr=, results in: \larr - Writing =\leftarrow=, results in: \leftarrow - Writing =\gets=, results in: \gets - Writing =\lArr=, results in: \lArr - Writing =\Leftarrow=, results in: \Leftarrow - Writing =\uarr=, results in: \uarr - Writing =\uparrow=, results in: \uparrow - Writing =\uArr=, results in: \uArr - Writing =\Uparrow=, results in: \Uparrow - Writing =\rarr=, results in: \rarr - Writing =\to=, results in: \to - Writing =\rightarrow=, results in: \rightarrow - Writing =\rArr=, results in: \rArr - Writing =\Rightarrow=, results in: \Rightarrow - Writing =\darr=, results in: \darr - Writing =\downarrow=, results in: \downarrow - Writing =\dArr=, results in: \dArr - Writing =\Downarrow=, results in: \Downarrow - Writing =\harr=, results in: \harr - Writing =\leftrightarrow=, results in: \leftrightarrow - Writing =\hArr=, results in: \hArr - Writing =\Leftrightarrow=, results in: \Leftrightarrow - Writing =\crarr=, results in: \crarr - Writing =\hookleftarrow=, results in: \hookleftarrow - Writing =\arccos=, results in: \arccos - Writing =\arcsin=, results in: \arcsin - Writing =\arctan=, results in: \arctan - Writing =\arg=, results in: \arg - Writing =\cos=, results in: \cos - Writing =\cosh=, results in: \cosh - Writing =\cot=, results in: \cot - Writing =\coth=, results in: \coth - Writing =\csc=, results in: \csc - Writing =\det=, results in: \det - Writing =\dim=, results in: \dim - Writing =\exp=, results in: \exp - Writing =\gcd=, results in: \gcd - Writing =\hom=, results in: \hom - Writing =\inf=, results in: \inf - Writing =\ker=, results in: \ker - Writing =\lg=, results in: \lg - Writing =\lim=, results in: \lim - Writing =\liminf=, results in: \liminf - Writing =\limsup=, results in: \limsup - Writing =\ln=, results in: \ln - Writing =\log=, results in: \log - Writing =\max=, results in: \max - Writing =\min=, results in: \min - Writing =\Pr=, results in: \Pr - Writing =\sec=, results in: \sec - Writing =\sin=, results in: \sin - Writing =\sinh=, results in: \sinh - Writing =\tan=, results in: \tan - Writing =\tanh=, results in: \tanh - Writing =\bull=, results in: \bull - Writing =\bullet=, results in: \bullet - Writing =\star=, results in: \star - Writing =\lowast=, results in: \lowast - Writing =\ast=, results in: \ast - Writing =\odot=, results in: \odot - Writing =\oplus=, results in: \oplus - Writing =\otimes=, results in: \otimes - Writing =\checkmark=, results in: \checkmark - Writing =\para=, results in: \para - Writing =\ordf=, results in: \ordf - Writing =\ordm=, results in: \ordm - Writing =\cedil=, results in: \cedil - Writing =\oline=, results in: \oline - Writing =\uml=, results in: \uml - Writing =\zwnj=, results in: \zwnj - Writing =\zwj=, results in: \zwj - Writing =\lrm=, results in: \lrm - Writing =\rlm=, results in: \rlm - Writing =\smile=, results in: \smile - Writing =\smiley=, results in: \smiley - Writing =\blacksmile=, results in: \blacksmile - Writing =\sad=, results in: \sad - Writing =\clubs=, results in: \clubs - Writing =\clubsuit=, results in: \clubsuit - Writing =\spades=, results in: \spades - Writing =\spadesuit=, results in: \spadesuit - Writing =\hearts=, results in: \hearts - Writing =\heartsuit=, results in: \heartsuit - Writing =\diams=, results in: \diams - Writing =\diamondsuit=, results in: \diamondsuit - Writing =\Diamond=, results in: \Diamond - Writing =\loz=, results in: \loz * Some special cases In case nothing matches, the string is returned as is. \for \example \this \wont \break ruby-org-0.9.12/spec/markdown_examples/escape-pre.md000066400000000000000000000004251257631261400224010ustar00rootroot00000000000000```
  • [ ] “smart quotes”
  • [ ] I think I need this for ‘single quotes’ too. Don’t I?
  • [ ] Em dashes would be great — wouldn’t they?
  • [ ] I hope to develop an en dash sometime in 2010 – 2011.
  • ``` ruby-org-0.9.12/spec/markdown_examples/escape-pre.org000066400000000000000000000004631257631261400225720ustar00rootroot00000000000000 #+BEGIN_EXAMPLE
  • [ ] “smart quotes”
  • [ ] I think I need this for ‘single quotes’ too. Don’t I?
  • [ ] Em dashes would be great — wouldn’t they?
  • [ ] I hope to develop an en dash sometime in 2010 – 2011.
  • #+END_EXAMPLE ruby-org-0.9.12/spec/markdown_examples/export-exclude-only.md000066400000000000000000000023221257631261400243020ustar00rootroot00000000000000 What happens when you exceed the number of headline levels to export? # Headline 1 ## Headline 2 This bit of body **should** get exported. ### Headline 3 This bit of body gets exported. #### Headline 4 (include) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ### Another headline 3 This one **should not** get exported!! #### Another headline 4 This also **cannot** get exported!! ruby-org-0.9.12/spec/markdown_examples/export-exclude-only.org000066400000000000000000000061401257631261400244730ustar00rootroot00000000000000#+TITLE: export-headline-levels.org #+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_EXCLUDE_TAGS: exclude noexport #+TAGS: export noexport #+LINK_UP: #+LINK_HOME: What happens when you exceed the number of headline levels to export? * Shouldn't export :noexport: This text shouldn't be exported, right? ** Nor this subheading? Or its text? * Exlude me, too! :exclude: * Headline 1 :READING:DVD: ** Headline 2 This bit of body *should* get exported. *** Headline 3 :export: This bit of body gets exported. **** Headline 4 (include) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. **** Headline 4 (exclude) :noexport: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. *** Another headline 3 This one *should not* get exported!! **** Another headline 4 This also *cannot* get exported!! ruby-org-0.9.12/spec/markdown_examples/export-keywords.md000066400000000000000000000001211257631261400235340ustar00rootroot00000000000000Testing that I can export keywords. # This is a todo item. # this item is done! ruby-org-0.9.12/spec/markdown_examples/export-keywords.org000066400000000000000000000010771257631261400237360ustar00rootroot00000000000000#+TITLE: export-keywords.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: Testing that I can export keywords. * TODO This is a todo item. * DONE this item is done! ruby-org-0.9.12/spec/markdown_examples/export-tags.md000066400000000000000000000020501257631261400226260ustar00rootroot00000000000000 What happens when you exceed the number of headline levels to export? # Headline 1 ## Headline 2 ### Headline 3 This bit of body gets exported. #### Headline 4 (include) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ruby-org-0.9.12/spec/markdown_examples/export-tags.org000066400000000000000000000061771257631261400230330ustar00rootroot00000000000000#+TITLE: export-headline-levels.org #+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: exclude noexport #+TAGS: export noexport #+LINK_UP: #+LINK_HOME: What happens when you exceed the number of headline levels to export? * Shouldn't export :noexport: This text shouldn't be exported, right? ** Nor this subheading? Or its text? * Exlude me, too! :exclude: * Headline 1 :READING:DVD: ** Headline 2 This bit of body should not get exported. *** Headline 3 :export: This bit of body gets exported. **** Headline 4 (include) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. **** Headline 4 (exclude) :noexport: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. *** Another headline 3 This one *should not* get exported!! **** Another headline 4 This also *cannot* get exported!! ruby-org-0.9.12/spec/markdown_examples/export-title.md000066400000000000000000000001371257631261400230150ustar00rootroot00000000000000 This simple org document should get a title from the `TITLE` option at the front of the file. ruby-org-0.9.12/spec/markdown_examples/export-title.org000066400000000000000000000001671257631261400232070ustar00rootroot00000000000000#+TITLE: Export Title This simple org document should get a title from the =TITLE= option at the front of the file. ruby-org-0.9.12/spec/markdown_examples/footnotes.md000066400000000000000000000004001257631261400223660ustar00rootroot00000000000000 # Footnotes Using numbers [fn:0] Using letters and not defined in the footnote [fn:abc] Using letters and defined in the footnote [fn:abc:definition of abc] Defined in the footnote itself with markup [fn:1:*blub*] [fn:0] Definition of first footnote ruby-org-0.9.12/spec/markdown_examples/footnotes.org000066400000000000000000000004421257631261400225630ustar00rootroot00000000000000#+TITLE: Footnotes #+OPTIONS: f:t * Footnotes Using numbers [fn:0] Using letters and not defined in the footnote [fn:abc] Using letters and defined in the footnote [fn:abc:definition of abc] Defined in the footnote itself with markup [fn:1:*blub*] [fn:0] Definition of first footnote ruby-org-0.9.12/spec/markdown_examples/horizontal_rule.md000066400000000000000000000002031257631261400235670ustar00rootroot00000000000000Useful contribution by [Neil-Smithline](http://www.neilsmithline.com) 5 hyphens or more, -------- will produce a horizontal rule. ruby-org-0.9.12/spec/markdown_examples/horizontal_rule.org000066400000000000000000000002021257631261400237550ustar00rootroot00000000000000Useful contribution by [[http://www.neilsmithline.com][Neil-Smithline]] 5 hyphens or more, ----- will produce a horizontal rule. ruby-org-0.9.12/spec/markdown_examples/html-literal.md000066400000000000000000000002321257631261400227470ustar00rootroot00000000000000HTML literals ORG escapes HTML by default. This should not be bold text! Instead, it should look like regular text with some HTML tags around it. ruby-org-0.9.12/spec/markdown_examples/html-literal.org000066400000000000000000000002331257631261400231370ustar00rootroot00000000000000HTML literals ORG escapes HTML by default. This should not be bold text! Instead, it should look like regular text with some HTML tags around it. ruby-org-0.9.12/spec/markdown_examples/include-file.md000066400000000000000000000015631257631261400227210ustar00rootroot00000000000000 # Basic tests # Within a commented block # Within a center block The following included file will be centered: # Within a blockquote This is similar to the center block: > Before > After # Within an example block, it should not be possible to include a file. #+INCLUDE: "./spec/html_examples/only-list.org" # Within a list * A list that has an included file directive * Only go to the first level * when included it always goes to the first level and absorbs next list items * 3rd level * 3rd level, though it should be a different list # Within a table, cannot be included | One | Two | Three | | #+INCLUDE: "./spec/html_examples/only-list.org" | Five | Six | | Seven | Eight | Nine | # When including a file as an example # When including a file as an quote ruby-org-0.9.12/spec/markdown_examples/include-file.org000066400000000000000000000041001257631261400230760ustar00rootroot00000000000000#+TITLE: Example of including a file #+EXPORT_EXCLUDE_TAGS: noexport * DONE Basic tests #+INCLUDE: "./spec/html_examples/advanced-lists.org" #+INCLUDE: "./spec/html_examples/blockcomment.org" * DONE Within a commented block #+BEGIN_COMMENT This will be ignored but... #+INCLUDE: "./spec/html_examples/escape-pre.org" the included file above will be rendered. #+END_COMMENT * DONE Within a center block #+BEGIN_CENTER The following included file will be centered: #+INCLUDE: "./spec/html_examples/inline-images.org" #+END_CENTER * DONE Within a blockquote This is similar to the center block: #+begin_quote Before #+INCLUDE: "./spec/html_examples/inline-images.org" After #+end_quote * DONE Within an example block, it should not be possible to include a file. : #+INCLUDE: "./spec/html_examples/only-list.org" * TODO Within a source code block :noexport: It should not be possible to include a file within a source code block. (Some versions of Emacs Org mode also have this behavior though...) #+begin_src ruby :results output included_file = <. It should be possible to use both kind of links on the same paragraph: This is an angle link and this is a bracket link [[https://github.com/bdewey/org-ruby][to a repository]]. This is a bracket link [[https://github.com/bdewey/org-ruby][to a repository]] and this is an angle link . This is a bracket link [[https://github.com/bdewey/org-ruby][to a repository]] and this is a bracket link too [[https://github.com/bdewey/org-ruby][to a repository]]. This is an angle link and this is an angle link too . ruby-org-0.9.12/spec/markdown_examples/inline-images.md000066400000000000000000000007501257631261400230770ustar00rootroot00000000000000Inline Images Per the org-mode [spec](http://orgmode.org/manual/Images-and-tables.html#Images-and-tables), you can include inline images as links without any descriptive link text, like this: [http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg](http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg) I currently do not support the caption/link syntax, but I can include the inline image. I recognize the following image file types: * .jpg * .png * .gif * .jpeg ruby-org-0.9.12/spec/markdown_examples/inline-images.org000066400000000000000000000006521257631261400232670ustar00rootroot00000000000000Inline Images Per the org-mode [[http://orgmode.org/manual/Images-and-tables.html#Images-and-tables][spec]], you can include inline images as links without any descriptive link text, like this: [[http://farm5.static.flickr.com/4049/4358074549_5efb8b4903.jpg]] I currently do not support the caption/link syntax, but I can include the inline image. I recognize the following image file types: - .jpg - .png - .gif - .jpeg ruby-org-0.9.12/spec/markdown_examples/link-features.md000066400000000000000000000020361257631261400231260ustar00rootroot00000000000000 Org-mode export supports a lot of link features. I've covered "simple" HTML links elsewhere. Now let's cover links to other org files, other sections within documents, etc. # Links to other org files This is a link to the `code-comment.org` file in the same directory. In `emacs`, if you click it, the other file opens. We want the same behavior in the HTML export. [Code Comment](file:code-comment.org) # Search links This is a search link into code-comment.org. [Code Comment](file:code-comment.org::*Code%20Comment) # Correct handling of .org URIs in HTML markup routine (thanks @rayl!) * [foo.com website](http://foo.com) * [foo.org website](http://foo.org) * [foo.org/foo.org](http://foo.org/foo.org) * [localhost:4567/foo.org](http://localhost:4567/foo.org) # In these links, .org is converted to .html * [file:path.org label](file:path.org) * [file:notes/path.org label](file:notes/path.org) # Links abbreviations URLs can be abbreviated by a LINK definition in the org file [This is an abbreviated link example](example) ruby-org-0.9.12/spec/markdown_examples/link-features.org000066400000000000000000000022001257631261400233060ustar00rootroot00000000000000#+TITLE: link-features.org Org-mode export supports a lot of link features. I've covered "simple" HTML links elsewhere. Now let's cover links to other org files, other sections within documents, etc. * Links to other org files This is a link to the ~code-comment.org~ file in the same directory. In ~emacs~, if you click it, the other file opens. We want the same behavior in the HTML export. [[file:code-comment.org][Code Comment]] * Search links This is a search link into code-comment.org. [[file:code-comment.org::*Code%20Comment][Code Comment]] * Correct handling of .org URIs in HTML markup routine (thanks @rayl!) - [[http://foo.com][foo.com website]] - [[http://foo.org][foo.org website]] - [[http://foo.org/foo.org][foo.org/foo.org]] - [[http://localhost:4567/foo.org][localhost:4567/foo.org]] * In these links, .org is converted to .html - [[file:path.org][file:path.org label]] - [[file:notes/path.org][file:notes/path.org label]] * Links abbreviations URLs can be abbreviated by a LINK definition in the org file #+LINK: example http://example.com/something [[example][This is an abbreviated link example]] ruby-org-0.9.12/spec/markdown_examples/lists.md000066400000000000000000000031321257631261400215110ustar00rootroot00000000000000# Lists I want to make sure I have great support for lists. * This is an unordered list * This continues the unordered list And this is a paragraph **after** the list. ## Wrapping within the list * This is a single-line list item in the org file. * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * And this is the next item. The previous item needs to be on one line to keep `textile` happy. * Ditto the previous line, actually. ## Edge cases * This is a single-line list. And this is a **separate paragraph.** Note the indentation in the org file. ## Invalid lists Note that spaces are required to denote lists. Thus, none of the following should get recognized as lists. -This isn't a list. -And this isn't a list. 1.And this isn't a list. 2.And this isn't a list. ruby-org-0.9.12/spec/markdown_examples/lists.org000066400000000000000000000033121257631261400217000ustar00rootroot00000000000000* Lists I want to make sure I have great support for lists. - This is an unordered list - This continues the unordered list And this is a paragraph *after* the list. ** Wrapping within the list - This is a single-line list item in the org file. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - And this is the next item. The previous item needs to be on one line to keep =textile= happy. - Ditto the previous line, actually. ** Edge cases - This is a single-line list. And this is a *separate paragraph.* Note the indentation in the org file. ** Invalid lists Note that spaces are required to denote lists. Thus, none of the following should get recognized as lists. -This isn't a list. -And this isn't a list. 1.And this isn't a list. 2.And this isn't a list. ruby-org-0.9.12/spec/markdown_examples/metadata-comment.md000066400000000000000000000015201257631261400235720ustar00rootroot00000000000000# Metadata, etc. I normally filter out things that look like metadata. Can't do it any more. I need to see all of the following: ``` * DONE Handle inline formatting CLOSED: [2009-12-26 Sat 21:41] :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: I still need to handle: - [ ] =Inline code= How does the =emacs= HTML parser handle *inline* formatting? Ah, it looks like it defines everything in =org-emphasis-alist= (line 2855 of =org.el=). And then look at =org-emphasis-regexp-components=, line 2828 of =org.el=. It looks like they just use a crazy regexp for inline formatting. Which is good, because it means I can copy! ``` ruby-org-0.9.12/spec/markdown_examples/metadata-comment.org000066400000000000000000000015461257631261400237710ustar00rootroot00000000000000* Metadata, etc. I normally filter out things that look like metadata. Can't do it any more. I need to see all of the following: #+BEGIN_EXAMPLE * DONE Handle inline formatting CLOSED: [2009-12-26 Sat 21:41] :PROPERTIES: :ARCHIVE_TIME: 2009-12-26 Sat 22:16 :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org :ARCHIVE_OLPATH: <%= @page.title %>/Future Development :ARCHIVE_CATEGORY: orgmode_parser :ARCHIVE_TODO: DONE :END: I still need to handle: - [ ] =Inline code= How does the =emacs= HTML parser handle *inline* formatting? Ah, it looks like it defines everything in =org-emphasis-alist= (line 2855 of =org.el=). And then look at =org-emphasis-regexp-components=, line 2828 of =org.el=. It looks like they just use a crazy regexp for inline formatting. Which is good, because it means I can copy! #+END_EXAMPLE ruby-org-0.9.12/spec/markdown_examples/only-list.md000066400000000000000000000002321257631261400223030ustar00rootroot00000000000000 * This file has only a list * Note it will end with nothing other than a list item. * the world wants to know: Will org-ruby write the closing ul tag? ruby-org-0.9.12/spec/markdown_examples/only-list.org000066400000000000000000000002271257631261400224760ustar00rootroot00000000000000- This file has only a list - Note it will end with nothing other than a list item. - the world wants to know: Will org-ruby write the closing ul tag? ruby-org-0.9.12/spec/markdown_examples/only-table.md000066400000000000000000000002461257631261400224240ustar00rootroot00000000000000| One | Two | Three | Four | | Five | Six | Seven | Eight | | Nine | Ten | Eleven | Twelve | | **format** | *text* | `in` | *cells* | ruby-org-0.9.12/spec/markdown_examples/only-table.org000066400000000000000000000003151257631261400226100ustar00rootroot00000000000000| One | Two | Three | Four | |----------+--------+--------+---------| | Five | Six | Seven | Eight | | Nine | Ten | Eleven | Twelve | | *format* | /text/ | ~in~ | _cells_ | ruby-org-0.9.12/spec/markdown_examples/prepended-comma.md000066400000000000000000000023051257631261400234140ustar00rootroot00000000000000# Removing the prepended comma from Org mode example blocks As mentioned in [http://orgmode.org/manual/Literal-examples.html](http://orgmode.org/manual/Literal-examples.html), when at the beginning of the line there is either ",*" or ",#+" this prepended comma should be removed before parsing. (Fixes [https://github.com/bdewey/org-ruby/issues/50](https://github.com/bdewey/org-ruby/issues/50)) ## Here the prepended comma will be removed. ```org ,* Hello ,** Goodbye , *** Not a headline, but prepended comma still removed. ,* I am a headline ``` ## Here the prepended comma is should not be removed. ```js { "one": 1 , "two": 2 , "three": 3 , "four": 4 } ``` ## Here the prepended comma is also removed Emacs Org mode implementation also removes it. ```ruby text = <, when at the beginning of the line there is either ",*" or ",#+" this prepended comma should be removed before parsing. (Fixes ) ** DONE Here the prepended comma will be removed. #+begin_example org ,* Hello ,** Goodbye , *** Not a headline, but prepended comma still removed. ,* I am a headline #+end_example ** DONE Here the prepended comma is should not be removed. #+begin_example js { "one": 1 , "two": 2 , "three": 3 , "four": 4 } #+end_example ** DONE Here the prepended comma is also removed Emacs Org mode implementation also removes it. #+begin_example ruby text = <` This should be escaped: `= This should be escaped: `@@html:@@` This should be escaped: `@@html:@@= ruby-org-0.9.12/spec/markdown_examples/raw-html.org000066400000000000000000000014421257631261400222770ustar00rootroot00000000000000* Raw html can be embedded The following will render the tag as is: #+html: Hello And this will render some Javascript: #+html: ** HTML blocks They behave as follows: #+begin_html

    
    Hello.
    
    

    #+end_html ** Cases on which html should be escaped This should be escaped: ~~ # Matches the first = This should be escaped: == This should be escaped: ~@@html:@@~ # Matches the first = This should be escaped: =@@html:@@= ruby-org-0.9.12/spec/markdown_examples/skip-header.md000066400000000000000000000004521257631261400225510ustar00rootroot00000000000000This is header text. It exists in the org-file, but shouldn't show up in the HTML output. * Same with this list * Nope, shouldn't be in the output. ``` Even this code snippet shouldn't be there. Like a ninja. You can't see me. ``` # First heading This should be the first text in the output. ruby-org-0.9.12/spec/markdown_examples/skip-header.org000066400000000000000000000014361257631261400227430ustar00rootroot00000000000000#+TITLE: skip-header.org #+AUTHOR: #+EMAIL: brian@BRIAN-DESK #+DATE: 2009-12-29 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:t d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: This is header text. It exists in the org-file, but shouldn't show up in the HTML output. - Same with this list - Nope, shouldn't be in the output. #+BEGIN_EXAMPLE Even this code snippet shouldn't be there. Like a ninja. You can't see me. #+END_EXAMPLE * First heading This should be the first text in the output. ruby-org-0.9.12/spec/markdown_examples/skip-table.md000066400000000000000000000005321257631261400224070ustar00rootroot00000000000000 Checking that tables are skipped when directed. | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | For grins, here's another table without a header. Just keep the bases covered. | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | Again, in the HTML output, you should see **no tables**. ruby-org-0.9.12/spec/markdown_examples/skip-table.org000066400000000000000000000006431257631261400226010ustar00rootroot00000000000000#+TITLE: skip-table.org #+OPTIONS: |:nil Checking that tables are skipped when directed. | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | For grins, here's another table without a header. Just keep the bases covered. | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | Again, in the HTML output, you should see *no tables*. ruby-org-0.9.12/spec/markdown_examples/subsupscript-nil.md000066400000000000000000000000531257631261400237000ustar00rootroot00000000000000SUBSUPSCRIPT ab ab ruby-org-0.9.12/spec/markdown_examples/subsupscript-nil.org000066400000000000000000000000541257631261400240700ustar00rootroot00000000000000#+OPTIONS: ^:nil SUBSUPSCRIPT a^{b} a_{b} ruby-org-0.9.12/spec/markdown_examples/subsupscript.md000066400000000000000000000000531257631261400231200ustar00rootroot00000000000000SUBSUPSCRIPT ab ab ruby-org-0.9.12/spec/markdown_examples/subsupscript.org000066400000000000000000000000331257631261400233050ustar00rootroot00000000000000SUBSUPSCRIPT a^{b} a_{b} ruby-org-0.9.12/spec/markdown_examples/tables.md000066400000000000000000000015631257631261400216330ustar00rootroot00000000000000TABLES Different types of ORG tables. # Simple table, no header. | Cell one | Cell two | | Cell three | Cell four | # Indented table | Cell one | | Cell two | And here's some paragraph content. The line breaks will need to get removed here, but not for the tables. # Table with header | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | The separator row should not get printed out. # Table with complete box | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | Only the first row should be a header row. # Table with extra lines | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | | Ten | Eleven | Twelve | Only the first row should be a header row. # Fix error when table starts with hline (Thanks @til!) | foo | bar | | 1 | 2 | https://github.com/bdewey/org-ruby/pull/34 ruby-org-0.9.12/spec/markdown_examples/tables.org000066400000000000000000000022311257631261400220130ustar00rootroot00000000000000TABLES Different types of ORG tables. * Simple table, no header. | Cell one | Cell two | | Cell three | Cell four | * Indented table | Cell one | | Cell two | And here's some paragraph content. The line breaks will need to get removed here, but not for the tables. * Table with header | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | The separator row should not get printed out. * Table with complete box |-------+-------+-------| | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | |-------+-------+-------| Only the first row should be a header row. * Table with extra lines |-------+--------+--------| | One | Two | Three | |-------+--------+--------| | Four | Five | Six | | Seven | Eight | Nine | |-------+--------+--------| | Ten | Eleven | Twelve | |-------+--------+--------| Only the first row should be a header row. * Fix error when table starts with hline (Thanks @til!) |-----+-----| | foo | bar | |-----+-----| | 1 | 2 | https://github.com/bdewey/org-ruby/pull/34 ruby-org-0.9.12/spec/markdown_examples/text.md000066400000000000000000000016441257631261400213450ustar00rootroot00000000000000The simplest case: translating plain text. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ruby-org-0.9.12/spec/markdown_examples/text.org000066400000000000000000000016441257631261400215340ustar00rootroot00000000000000The simplest case: translating plain text. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ruby-org-0.9.12/spec/markdown_with_custom_markup_examples/000077500000000000000000000000001257631261400240365ustar00rootroot00000000000000ruby-org-0.9.12/spec/markdown_with_custom_markup_examples/custom_markup_for_markdown.yml000066400000000000000000000000651257631261400322230ustar00rootroot00000000000000--- :MarkdownMap: "*": "__" "/": "_" "_": "*" ruby-org-0.9.12/spec/markdown_with_custom_markup_examples/emphasis.md000066400000000000000000001212461257631261400261770ustar00rootroot00000000000000# Inline Formatting test for emphasis ## Simple feature test __bold__ _italic_ `code` `verbatim` *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) http://www.gmail.com [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ## All together in one line __bold__ _italic_ `code` `verbatim` *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) http://www.gmail.com [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ## Within code test ``` emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} ``` ## Mixed together test ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} ``` __Answer: *42__ * __Answer: *42*__ *Answer: _42_ * __Answer: /42/__ *Answer: `42` * __Answer: =42=__ *Answer: `42` * __Answer: ~42~__ *Answer: *42* * __Answer: _42___ *Answer: ~~42~~ * __Answer: +42+__ /Answer: __42__ / _Answer: *42*_ _Answer: /42_ / _Answer: /42/_ /Answer: `42` / _Answer: =42=_ /Answer: `42` / _Answer: ~42~_ /Answer: *42* / _Answer: _42__ /Answer: ~~42~~ / _Answer: +42+_ =Answer: __42__ = `Answer: *42*` =Answer: _42_ = `Answer: /42/` `Answer: =42` = `Answer: =42=` =Answer: `42` = `Answer: ~42~` =Answer: *42* = `Answer: _42_` =Answer: ~~42~~ = `Answer: +42+` ~Answer: __42__ ~ `Answer: *42*` ~Answer: _42_ ~ `Answer: /42/` ~Answer: `42` ~ `Answer: =42=` `Answer: ~42` ~ `Answer: ~42~` ~Answer: *42* ~ `Answer: _42_` ~Answer: ~~42~~ ~ `Answer: +42+` _Answer: __42__ _ *Answer: *42** _Answer: _42_ _ *Answer: /42/* _Answer: `42` _ *Answer: =42=* _Answer: `42` _ *Answer: ~42~* *Answer: _42* _ *Answer: _42_* _Answer: ~~42~~ _ *Answer: +42+* +Answer: __42__ + ~~Answer: *42*~~ +Answer: _42_ + ~~Answer: /42/~~ +Answer: `42` + ~~Answer: =42=~~ +Answer: `42` + ~~Answer: ~42~~~ +Answer: *42* + ~~Answer: _42_~~ ~~Answer: +42~~ + ~~Answer: +42+~~ ## Multiline support test :: one line ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} ``` __Starting the line here *and continuing here to close*__ __Starting the line here /and continuing here to close/__ __Starting the line here =and continuing here to close=__ __Starting the line here ~and continuing here to close~__ __Starting the line here _and continuing here to close___ __Starting the line here +and continuing here to close+__ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ `Starting the line here *and continuing here to close*` `Starting the line here /and continuing here to close/` `Starting the line here =and continuing here to close=` `Starting the line here ~and continuing here to close~` `Starting the line here _and continuing here to close_` `Starting the line here +and continuing here to close+` `Starting the line here *and continuing here to close*` `Starting the line here /and continuing here to close/` `Starting the line here =and continuing here to close=` `Starting the line here ~and continuing here to close~` `Starting the line here _and continuing here to close_` `Starting the line here +and continuing here to close+` *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* ~~Starting the line here *and continuing here to close*~~ ~~Starting the line here /and continuing here to close/~~ ~~Starting the line here =and continuing here to close=~~ ~~Starting the line here ~and continuing here to close~~~ ~~Starting the line here _and continuing here to close_~~ ~~Starting the line here +and continuing here to close+~~ ## Multiline support test :: two lines ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} ``` *Starting the line here __and continuing here to close*__ *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here _and continuing here to close/_ /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here `and continuing here to close=` =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here `and continuing here to close~` ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here *and continuing here to close_* _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here ~~and continuing here to close+~~ ## Together in same paragraph test __bold__ __bold__ __bold__ _italic_ __bold__ _italic_ `code` __bold__ `code` `verbatim` __bold__ `verbatim` *underline* __bold__ *underline* ~~strikethrough~~ __bold__ ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) __bold__ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) __bold__ [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) __bold__ [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) __bold__ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) __bold__ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) __bold__ [http://www.google.com](http://www.google.com) __bold__ _italic_ __bold__ _italic_ _italic_ _italic_ `code` _italic_ `code` `verbatim` _italic_ `verbatim` *underline* _italic_ *underline* ~~strikethrough~~ _italic_ ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) _italic_ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) _italic_ [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) _italic_ [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) _italic_ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) _italic_ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) _italic_ [http://www.google.com](http://www.google.com) __bold__ `code` __bold__ _italic_ `code` _italic_ `code` `code` `code` `verbatim` `code` `verbatim` *underline* `code` *underline* ~~strikethrough~~ `code` ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) `code` [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) `code` [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) `code` [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) `code` [http://www.google.com](http://www.google.com) __bold__ `verbatim` __bold__ _italic_ `verbatim` _italic_ `code` `verbatim` `code` `verbatim` `verbatim` `verbatim` *underline* `verbatim` *underline* ~~strikethrough~~ `verbatim` ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) `verbatim` [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) `verbatim` [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) `verbatim` [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) `verbatim` [http://www.google.com](http://www.google.com) __bold__ *underline* __bold__ _italic_ *underline* _italic_ `code` *underline* `code` `verbatim` *underline* `verbatim` *underline* *underline* *underline* ~~strikethrough~~ *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) *underline* [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) *underline* [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) *underline* [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) *underline* [http://www.google.com](http://www.google.com) __bold__ ~~strikethrough~~ __bold__ _italic_ ~~strikethrough~~ _italic_ `code` ~~strikethrough~~ `code` `verbatim` ~~strikethrough~~ `verbatim` *underline* ~~strikethrough~~ *underline* ~~strikethrough~~ ~~strikethrough~~ ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) ~~strikethrough~~ [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.google.com](http://www.google.com) __bold__ [http://www.bing.com](http://www.bing.com) __bold__ _italic_ [http://www.bing.com](http://www.bing.com) _italic_ `code` [http://www.bing.com](http://www.bing.com) `code` `verbatim` [http://www.bing.com](http://www.bing.com) `verbatim` *underline* [http://www.bing.com](http://www.bing.com) *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) __bold__ [http://www.google.com](http://www.google.com) __bold__ _italic_ [http://www.google.com](http://www.google.com) _italic_ `code` [http://www.google.com](http://www.google.com) `code` `verbatim` [http://www.google.com](http://www.google.com) `verbatim` *underline* [http://www.google.com](http://www.google.com) *underline* ~~strikethrough~~ [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) __bold__ [helpful text link](http://www.xkcd.com) __bold__ _italic_ [helpful text link](http://www.xkcd.com) _italic_ `code` [helpful text link](http://www.xkcd.com) `code` `verbatim` [helpful text link](http://www.xkcd.com) `verbatim` *underline* [helpful text link](http://www.xkcd.com) *underline* ~~strikethrough~~ [helpful text link](http://www.xkcd.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) __bold__ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) __bold__ _italic_ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) _italic_ `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) __bold__ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) __bold__ _italic_ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) _italic_ `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) __bold__ [http://www.google.com](http://www.google.com) __bold__ _italic_ [http://www.google.com](http://www.google.com) _italic_ `code` [http://www.google.com](http://www.google.com) `code` `verbatim` [http://www.google.com](http://www.google.com) `verbatim` *underline* [http://www.google.com](http://www.google.com) *underline* ~~strikethrough~~ [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) ## Together within a table | __bold__ __bold__ | _italic_ __bold__ | `code` __bold__ | `verbatim` __bold__ | *underline* __bold__ | ~~strikethrough~~ __bold__ | [http://www.bing.com](http://www.bing.com) __bold__ | [http://www.google.com](http://www.google.com) __bold__ | [helpful text link](http://www.xkcd.com) __bold__ | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) __bold__ | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) __bold__ | [http://www.google.com](http://www.google.com) __bold__ | | __bold__ _italic_ | _italic_ _italic_ | `code` _italic_ | `verbatim` _italic_ | *underline* _italic_ | ~~strikethrough~~ _italic_ | [http://www.bing.com](http://www.bing.com) _italic_ | [http://www.google.com](http://www.google.com) _italic_ | [helpful text link](http://www.xkcd.com) _italic_ | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) _italic_ | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) _italic_ | [http://www.google.com](http://www.google.com) _italic_ | | __bold__ `code` | _italic_ `code` | `code` `code` | `verbatim` `code` | *underline* `code` | ~~strikethrough~~ `code` | [http://www.bing.com](http://www.bing.com) `code` | [http://www.google.com](http://www.google.com) `code` | [helpful text link](http://www.xkcd.com) `code` | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` | [http://www.google.com](http://www.google.com) `code` | | __bold__ `verbatim` | _italic_ `verbatim` | `code` `verbatim` | `verbatim` `verbatim` | *underline* `verbatim` | ~~strikethrough~~ `verbatim` | [http://www.bing.com](http://www.bing.com) `verbatim` | [http://www.google.com](http://www.google.com) `verbatim` | [helpful text link](http://www.xkcd.com) `verbatim` | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` | [http://www.google.com](http://www.google.com) `verbatim` | | __bold__ *underline* | _italic_ *underline* | `code` *underline* | `verbatim` *underline* | *underline* *underline* | ~~strikethrough~~ *underline* | [http://www.bing.com](http://www.bing.com) *underline* | [http://www.google.com](http://www.google.com) *underline* | [helpful text link](http://www.xkcd.com) *underline* | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* | [http://www.google.com](http://www.google.com) *underline* | | __bold__ ~~strikethrough~~ | _italic_ ~~strikethrough~~ | `code` ~~strikethrough~~ | `verbatim` ~~strikethrough~~ | *underline* ~~strikethrough~~ | ~~strikethrough~~ ~~strikethrough~~ | [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ | [http://www.google.com](http://www.google.com) ~~strikethrough~~ | [helpful text link](http://www.xkcd.com) ~~strikethrough~~ | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ | [http://www.google.com](http://www.google.com) ~~strikethrough~~ | | __bold__ [http://www.bing.com](http://www.bing.com) | _italic_ [http://www.bing.com](http://www.bing.com) | `code` [http://www.bing.com](http://www.bing.com) | `verbatim` [http://www.bing.com](http://www.bing.com) | *underline* [http://www.bing.com](http://www.bing.com) | ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) | [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) | [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) | [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) | [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) | | __bold__ [http://www.google.com](http://www.google.com) | _italic_ [http://www.google.com](http://www.google.com) | `code` [http://www.google.com](http://www.google.com) | `verbatim` [http://www.google.com](http://www.google.com) | *underline* [http://www.google.com](http://www.google.com) | ~~strikethrough~~ [http://www.google.com](http://www.google.com) | [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | | __bold__ [helpful text link](http://www.xkcd.com) | _italic_ [helpful text link](http://www.xkcd.com) | `code` [helpful text link](http://www.xkcd.com) | `verbatim` [helpful text link](http://www.xkcd.com) | *underline* [helpful text link](http://www.xkcd.com) | ~~strikethrough~~ [helpful text link](http://www.xkcd.com) | [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) | [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) | [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) | [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) | | __bold__ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | _italic_ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | | __bold__ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | _italic_ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | | __bold__ [http://www.google.com](http://www.google.com) | _italic_ [http://www.google.com](http://www.google.com) | `code` [http://www.google.com](http://www.google.com) | `verbatim` [http://www.google.com](http://www.google.com) | *underline* [http://www.google.com](http://www.google.com) | ~~strikethrough~~ [http://www.google.com](http://www.google.com) | [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | ruby-org-0.9.12/spec/markdown_with_custom_markup_examples/emphasis.org000066400000000000000000000777521257631261400264020ustar00rootroot00000000000000* Inline Formatting test for emphasis ** Simple feature test *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** All together in one line *bold* /italic/ =code= ~verbatim~ _underline_ +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] http://www.gmail.com [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Within code test #+begin_example emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} #+end_example ** Mixed together test #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} #+end_example *Answer: *42* * *Answer: *42** *Answer: /42/ * *Answer: /42/* *Answer: =42= * *Answer: =42=* *Answer: ~42~ * *Answer: ~42~* *Answer: _42_ * *Answer: _42_* *Answer: +42+ * *Answer: +42+* /Answer: *42* / /Answer: *42*/ /Answer: /42/ / /Answer: /42// /Answer: =42= / /Answer: =42=/ /Answer: ~42~ / /Answer: ~42~/ /Answer: _42_ / /Answer: _42_/ /Answer: +42+ / /Answer: +42+/ =Answer: *42* = =Answer: *42*= =Answer: /42/ = =Answer: /42/= =Answer: =42= = =Answer: =42== =Answer: ~42~ = =Answer: ~42~= =Answer: _42_ = =Answer: _42_= =Answer: +42+ = =Answer: +42+= ~Answer: *42* ~ ~Answer: *42*~ ~Answer: /42/ ~ ~Answer: /42/~ ~Answer: =42= ~ ~Answer: =42=~ ~Answer: ~42~ ~ ~Answer: ~42~~ ~Answer: _42_ ~ ~Answer: _42_~ ~Answer: +42+ ~ ~Answer: +42+~ _Answer: *42* _ _Answer: *42*_ _Answer: /42/ _ _Answer: /42/_ _Answer: =42= _ _Answer: =42=_ _Answer: ~42~ _ _Answer: ~42~_ _Answer: _42_ _ _Answer: _42__ _Answer: +42+ _ _Answer: +42+_ +Answer: *42* + +Answer: *42*+ +Answer: /42/ + +Answer: /42/+ +Answer: =42= + +Answer: =42=+ +Answer: ~42~ + +Answer: ~42~+ +Answer: _42_ + +Answer: _42_+ +Answer: +42+ + +Answer: +42++ ** Multiline support test :: one line #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Multiline support test :: two lines #+begin_example emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} #+end_example *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here /and continuing here to close// /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here =and continuing here to close== =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here ~and continuing here to close~~ ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here _and continuing here to close__ _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here +and continuing here to close++ ** Together in same paragraph test *bold* *bold* *bold* /italic/ *bold* /italic/ =code= *bold* =code= ~verbatim~ *bold* ~verbatim~ _underline_ *bold* _underline_ +strikethrough+ *bold* +strikethrough+ [[http://www.bing.com]] *bold* [[http://www.bing.com]] [[http://www.google.com]] *bold* [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ *bold* /italic/ /italic/ /italic/ =code= /italic/ =code= ~verbatim~ /italic/ ~verbatim~ _underline_ /italic/ _underline_ +strikethrough+ /italic/ +strikethrough+ [[http://www.bing.com]] /italic/ [[http://www.bing.com]] [[http://www.google.com]] /italic/ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] /italic/ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ *bold* =code= *bold* /italic/ =code= /italic/ =code= =code= =code= ~verbatim~ =code= ~verbatim~ _underline_ =code= _underline_ +strikethrough+ =code= +strikethrough+ [[http://www.bing.com]] =code= [[http://www.bing.com]] [[http://www.google.com]] =code= [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] =code= [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= *bold* ~verbatim~ *bold* /italic/ ~verbatim~ /italic/ =code= ~verbatim~ =code= ~verbatim~ ~verbatim~ ~verbatim~ _underline_ ~verbatim~ _underline_ +strikethrough+ ~verbatim~ +strikethrough+ [[http://www.bing.com]] ~verbatim~ [[http://www.bing.com]] [[http://www.google.com]] ~verbatim~ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] ~verbatim~ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ *bold* _underline_ *bold* /italic/ _underline_ /italic/ =code= _underline_ =code= ~verbatim~ _underline_ ~verbatim~ _underline_ _underline_ _underline_ +strikethrough+ _underline_ +strikethrough+ [[http://www.bing.com]] _underline_ [[http://www.bing.com]] [[http://www.google.com]] _underline_ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] _underline_ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ *bold* +strikethrough+ *bold* /italic/ +strikethrough+ /italic/ =code= +strikethrough+ =code= ~verbatim~ +strikethrough+ ~verbatim~ _underline_ +strikethrough+ _underline_ +strikethrough+ +strikethrough+ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] +strikethrough+ [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ *bold* [[http://www.bing.com]] *bold* /italic/ [[http://www.bing.com]] /italic/ =code= [[http://www.bing.com]] =code= ~verbatim~ [[http://www.bing.com]] ~verbatim~ _underline_ [[http://www.bing.com]] _underline_ +strikethrough+ [[http://www.bing.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] *bold* [[http://www.google.com]] *bold* /italic/ [[http://www.google.com]] /italic/ =code= [[http://www.google.com]] =code= ~verbatim~ [[http://www.google.com]] ~verbatim~ _underline_ [[http://www.google.com]] _underline_ +strikethrough+ [[http://www.google.com]] +strikethrough+ [[http://www.bing.com]] [[http://www.google.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] *bold* [[http://www.xkcd.com][helpful text link]] *bold* /italic/ [[http://www.xkcd.com][helpful text link]] /italic/ =code= [[http://www.xkcd.com][helpful text link]] =code= ~verbatim~ [[http://www.xkcd.com][helpful text link]] ~verbatim~ _underline_ [[http://www.xkcd.com][helpful text link]] _underline_ +strikethrough+ [[http://www.xkcd.com][helpful text link]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* *bold* /italic/ /italic/ =code= =code= ~verbatim~ ~verbatim~ _underline_ _underline_ +strikethrough+ +strikethrough+ [[http://www.bing.com]] [[http://www.bing.com]] [[http://www.google.com]] [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ** Together within a table | *bold* *bold* | /italic/ *bold* | =code= *bold* | ~verbatim~ *bold* | _underline_ *bold* | +strikethrough+ *bold* | [[http://www.bing.com]] *bold* | [[http://www.google.com]] *bold* | [[http://www.xkcd.com][helpful text link]] *bold* | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] *bold* | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] *bold* | *bold* | | *bold* /italic/ | /italic/ /italic/ | =code= /italic/ | ~verbatim~ /italic/ | _underline_ /italic/ | +strikethrough+ /italic/ | [[http://www.bing.com]] /italic/ | [[http://www.google.com]] /italic/ | [[http://www.xkcd.com][helpful text link]] /italic/ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] /italic/ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] /italic/ | /italic/ | | *bold* =code= | /italic/ =code= | =code= =code= | ~verbatim~ =code= | _underline_ =code= | +strikethrough+ =code= | [[http://www.bing.com]] =code= | [[http://www.google.com]] =code= | [[http://www.xkcd.com][helpful text link]] =code= | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] =code= | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] =code= | =code= | | *bold* ~verbatim~ | /italic/ ~verbatim~ | =code= ~verbatim~ | ~verbatim~ ~verbatim~ | _underline_ ~verbatim~ | +strikethrough+ ~verbatim~ | [[http://www.bing.com]] ~verbatim~ | [[http://www.google.com]] ~verbatim~ | [[http://www.xkcd.com][helpful text link]] ~verbatim~ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] ~verbatim~ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] ~verbatim~ | ~verbatim~ | | *bold* _underline_ | /italic/ _underline_ | =code= _underline_ | ~verbatim~ _underline_ | _underline_ _underline_ | +strikethrough+ _underline_ | [[http://www.bing.com]] _underline_ | [[http://www.google.com]] _underline_ | [[http://www.xkcd.com][helpful text link]] _underline_ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] _underline_ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] _underline_ | _underline_ | | *bold* +strikethrough+ | /italic/ +strikethrough+ | =code= +strikethrough+ | ~verbatim~ +strikethrough+ | _underline_ +strikethrough+ | +strikethrough+ +strikethrough+ | [[http://www.bing.com]] +strikethrough+ | [[http://www.google.com]] +strikethrough+ | [[http://www.xkcd.com][helpful text link]] +strikethrough+ | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] +strikethrough+ | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] +strikethrough+ | +strikethrough+ | | *bold* [[http://www.bing.com]] | /italic/ [[http://www.bing.com]] | =code= [[http://www.bing.com]] | ~verbatim~ [[http://www.bing.com]] | _underline_ [[http://www.bing.com]] | +strikethrough+ [[http://www.bing.com]] | [[http://www.bing.com]] [[http://www.bing.com]] | [[http://www.google.com]] [[http://www.bing.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.bing.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.bing.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.bing.com]] | [[http://www.bing.com]] | | *bold* [[http://www.google.com]] | /italic/ [[http://www.google.com]] | =code= [[http://www.google.com]] | ~verbatim~ [[http://www.google.com]] | _underline_ [[http://www.google.com]] | +strikethrough+ [[http://www.google.com]] | [[http://www.bing.com]] [[http://www.google.com]] | [[http://www.google.com]] [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] [[http://www.google.com]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.google.com]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.google.com]] | [[http://www.google.com]] | | *bold* [[http://www.xkcd.com][helpful text link]] | /italic/ [[http://www.xkcd.com][helpful text link]] | =code= [[http://www.xkcd.com][helpful text link]] | ~verbatim~ [[http://www.xkcd.com][helpful text link]] | _underline_ [[http://www.xkcd.com][helpful text link]] | +strikethrough+ [[http://www.xkcd.com][helpful text link]] | [[http://www.bing.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.google.com]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][helpful text link]] | [[http://www.xkcd.com][helpful text link]] | | *bold* [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | /italic/ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | =code= [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | ~verbatim~ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | _underline_ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | +strikethrough+ [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.bing.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.google.com]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][helpful text link]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | | *bold* [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | /italic/ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | =code= [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | ~verbatim~ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | _underline_ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | +strikethrough+ [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.bing.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.google.com]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][helpful text link]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | *bold* | /italic/ | =code= | ~verbatim~ | _underline_ | +strikethrough+ | [[http://www.bing.com]] | [[http://www.google.com]] | [[http://www.xkcd.com][helpful text link]] | [[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]] | [[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]] | | ruby-org-0.9.12/spec/markdown_with_custom_markup_examples/emphasis_default.md000066400000000000000000001212461257631261400277030ustar00rootroot00000000000000# Inline Formatting test for emphasis ## Simple feature test **bold** *italic* `code` `verbatim` *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) http://www.gmail.com [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ## All together in one line **bold** *italic* `code` `verbatim` *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) http://www.gmail.com [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ## Within code test ``` emphasis_tests = [ "*bold*", "/italic/", "=code=", "~verbatim~", "_underline_ ", "+strikethrough+", "[[http://www.bing.com]]", "[[http://www.google.com]]", "[[http://www.xkcd.com][helpful text link]]", "[[http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg]]", "[[http://www.xkcd.com][http://imgs.xkcd.com/comics/t_cells.png]]", "", ] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [b, ' ', a, ' ', b, "\n\n"].join('') end end all.each {|e| puts e} ``` ## Mixed together test ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [[a, 'Answer: ', b, '42', b, ' ',a, "\n\n"].join(''), [a, 'Answer: ', b, '42', b, '',a, "\n\n"].join('')].flatten end end all.each {|e| puts e} ``` **Answer: *42** * **Answer: *42*** *Answer: *42* * **Answer: /42/** *Answer: `42` * **Answer: =42=** *Answer: `42` * **Answer: ~42~** *Answer: *42* * **Answer: _42_** *Answer: ~~42~~ * **Answer: +42+** /Answer: **42** / *Answer: *42** *Answer: /42* / *Answer: /42/* /Answer: `42` / *Answer: =42=* /Answer: `42` / *Answer: ~42~* /Answer: *42* / *Answer: _42_* /Answer: ~~42~~ / *Answer: +42+* =Answer: **42** = `Answer: *42*` =Answer: *42* = `Answer: /42/` `Answer: =42` = `Answer: =42=` =Answer: `42` = `Answer: ~42~` =Answer: *42* = `Answer: _42_` =Answer: ~~42~~ = `Answer: +42+` ~Answer: **42** ~ `Answer: *42*` ~Answer: *42* ~ `Answer: /42/` ~Answer: `42` ~ `Answer: =42=` `Answer: ~42` ~ `Answer: ~42~` ~Answer: *42* ~ `Answer: _42_` ~Answer: ~~42~~ ~ `Answer: +42+` _Answer: **42** _ *Answer: *42** _Answer: *42* _ *Answer: /42/* _Answer: `42` _ *Answer: =42=* _Answer: `42` _ *Answer: ~42~* *Answer: _42* _ *Answer: _42_* _Answer: ~~42~~ _ *Answer: +42+* +Answer: **42** + ~~Answer: *42*~~ +Answer: *42* + ~~Answer: /42/~~ +Answer: `42` + ~~Answer: =42=~~ +Answer: `42` + ~~Answer: ~42~~~ +Answer: *42* + ~~Answer: _42_~~ ~~Answer: +42~~ + ~~Answer: +42+~~ ## Multiline support test :: one line ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} ``` **Starting the line here *and continuing here to close*** **Starting the line here /and continuing here to close/** **Starting the line here =and continuing here to close=** **Starting the line here ~and continuing here to close~** **Starting the line here _and continuing here to close_** **Starting the line here +and continuing here to close+** *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* `Starting the line here *and continuing here to close*` `Starting the line here /and continuing here to close/` `Starting the line here =and continuing here to close=` `Starting the line here ~and continuing here to close~` `Starting the line here _and continuing here to close_` `Starting the line here +and continuing here to close+` `Starting the line here *and continuing here to close*` `Starting the line here /and continuing here to close/` `Starting the line here =and continuing here to close=` `Starting the line here ~and continuing here to close~` `Starting the line here _and continuing here to close_` `Starting the line here +and continuing here to close+` *Starting the line here *and continuing here to close** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* ~~Starting the line here *and continuing here to close*~~ ~~Starting the line here /and continuing here to close/~~ ~~Starting the line here =and continuing here to close=~~ ~~Starting the line here ~and continuing here to close~~~ ~~Starting the line here _and continuing here to close_~~ ~~Starting the line here +and continuing here to close+~~ ## Multiline support test :: two lines ``` emphasis_tests = ["*","/","=","~","_","+"] all = emphasis_tests.map do |a| emphasis_tests.map do |b| [a, 'Starting the line here ', "\n", b, 'and continuing here', "\n", 'to close', b, a, "\n\n"].join('') end end all.each {|e| puts e} ``` *Starting the line here **and continuing here to close*** *Starting the line here /and continuing here to close/* *Starting the line here =and continuing here to close=* *Starting the line here ~and continuing here to close~* *Starting the line here _and continuing here to close_* *Starting the line here +and continuing here to close+* /Starting the line here *and continuing here to close*/ /Starting the line here *and continuing here to close/* /Starting the line here =and continuing here to close=/ /Starting the line here ~and continuing here to close~/ /Starting the line here _and continuing here to close_/ /Starting the line here +and continuing here to close+/ =Starting the line here *and continuing here to close*= =Starting the line here /and continuing here to close/= =Starting the line here `and continuing here to close=` =Starting the line here ~and continuing here to close~= =Starting the line here _and continuing here to close_= =Starting the line here +and continuing here to close+= ~Starting the line here *and continuing here to close*~ ~Starting the line here /and continuing here to close/~ ~Starting the line here =and continuing here to close=~ ~Starting the line here `and continuing here to close~` ~Starting the line here _and continuing here to close_~ ~Starting the line here +and continuing here to close+~ _Starting the line here *and continuing here to close*_ _Starting the line here /and continuing here to close/_ _Starting the line here =and continuing here to close=_ _Starting the line here ~and continuing here to close~_ _Starting the line here *and continuing here to close_* _Starting the line here +and continuing here to close+_ +Starting the line here *and continuing here to close*+ +Starting the line here /and continuing here to close/+ +Starting the line here =and continuing here to close=+ +Starting the line here ~and continuing here to close~+ +Starting the line here _and continuing here to close_+ +Starting the line here ~~and continuing here to close+~~ ## Together in same paragraph test **bold** **bold** **bold** *italic* **bold** *italic* `code` **bold** `code` `verbatim` **bold** `verbatim` *underline* **bold** *underline* ~~strikethrough~~ **bold** ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) **bold** [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) **bold** [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) **bold** [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) **bold** ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) **bold** *italic* **bold** *italic* *italic* *italic* `code` *italic* `code` `verbatim` *italic* `verbatim` *underline* *italic* *underline* ~~strikethrough~~ *italic* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) *italic* [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) *italic* [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) *italic* [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *italic* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *italic* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) *italic* [http://www.google.com](http://www.google.com) **bold** `code` **bold** *italic* `code` *italic* `code` `code` `code` `verbatim` `code` `verbatim` *underline* `code` *underline* ~~strikethrough~~ `code` ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) `code` [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) `code` [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) `code` [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) `code` [http://www.google.com](http://www.google.com) **bold** `verbatim` **bold** *italic* `verbatim` *italic* `code` `verbatim` `code` `verbatim` `verbatim` `verbatim` *underline* `verbatim` *underline* ~~strikethrough~~ `verbatim` ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) `verbatim` [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) `verbatim` [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) `verbatim` [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) `verbatim` [http://www.google.com](http://www.google.com) **bold** *underline* **bold** *italic* *underline* *italic* `code` *underline* `code` `verbatim` *underline* `verbatim` *underline* *underline* *underline* ~~strikethrough~~ *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) *underline* [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) *underline* [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) *underline* [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) *underline* [http://www.google.com](http://www.google.com) **bold** ~~strikethrough~~ **bold** *italic* ~~strikethrough~~ *italic* `code` ~~strikethrough~~ `code` `verbatim` ~~strikethrough~~ `verbatim` *underline* ~~strikethrough~~ *underline* ~~strikethrough~~ ~~strikethrough~~ ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) ~~strikethrough~~ [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.google.com](http://www.google.com) **bold** [http://www.bing.com](http://www.bing.com) **bold** *italic* [http://www.bing.com](http://www.bing.com) *italic* `code` [http://www.bing.com](http://www.bing.com) `code` `verbatim` [http://www.bing.com](http://www.bing.com) `verbatim` *underline* [http://www.bing.com](http://www.bing.com) *underline* ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) **bold** *italic* [http://www.google.com](http://www.google.com) *italic* `code` [http://www.google.com](http://www.google.com) `code` `verbatim` [http://www.google.com](http://www.google.com) `verbatim` *underline* [http://www.google.com](http://www.google.com) *underline* ~~strikethrough~~ [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) **bold** [helpful text link](http://www.xkcd.com) **bold** *italic* [helpful text link](http://www.xkcd.com) *italic* `code` [helpful text link](http://www.xkcd.com) `code` `verbatim` [helpful text link](http://www.xkcd.com) `verbatim` *underline* [helpful text link](http://www.xkcd.com) *underline* ~~strikethrough~~ [helpful text link](http://www.xkcd.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) **bold** [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) **bold** *italic* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *italic* `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) **bold** ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) **bold** *italic* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *italic* `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) **bold** [http://www.google.com](http://www.google.com) **bold** *italic* [http://www.google.com](http://www.google.com) *italic* `code` [http://www.google.com](http://www.google.com) `code` `verbatim` [http://www.google.com](http://www.google.com) `verbatim` *underline* [http://www.google.com](http://www.google.com) *underline* ~~strikethrough~~ [http://www.google.com](http://www.google.com) ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) ## Together within a table | **bold** **bold** | *italic* **bold** | `code` **bold** | `verbatim` **bold** | *underline* **bold** | ~~strikethrough~~ **bold** | [http://www.bing.com](http://www.bing.com) **bold** | [http://www.google.com](http://www.google.com) **bold** | [helpful text link](http://www.xkcd.com) **bold** | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) **bold** | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) **bold** | [http://www.google.com](http://www.google.com) **bold** | | **bold** *italic* | *italic* *italic* | `code` *italic* | `verbatim` *italic* | *underline* *italic* | ~~strikethrough~~ *italic* | [http://www.bing.com](http://www.bing.com) *italic* | [http://www.google.com](http://www.google.com) *italic* | [helpful text link](http://www.xkcd.com) *italic* | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *italic* | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *italic* | [http://www.google.com](http://www.google.com) *italic* | | **bold** `code` | *italic* `code` | `code` `code` | `verbatim` `code` | *underline* `code` | ~~strikethrough~~ `code` | [http://www.bing.com](http://www.bing.com) `code` | [http://www.google.com](http://www.google.com) `code` | [helpful text link](http://www.xkcd.com) `code` | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `code` | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `code` | [http://www.google.com](http://www.google.com) `code` | | **bold** `verbatim` | *italic* `verbatim` | `code` `verbatim` | `verbatim` `verbatim` | *underline* `verbatim` | ~~strikethrough~~ `verbatim` | [http://www.bing.com](http://www.bing.com) `verbatim` | [http://www.google.com](http://www.google.com) `verbatim` | [helpful text link](http://www.xkcd.com) `verbatim` | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) `verbatim` | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) `verbatim` | [http://www.google.com](http://www.google.com) `verbatim` | | **bold** *underline* | *italic* *underline* | `code` *underline* | `verbatim` *underline* | *underline* *underline* | ~~strikethrough~~ *underline* | [http://www.bing.com](http://www.bing.com) *underline* | [http://www.google.com](http://www.google.com) *underline* | [helpful text link](http://www.xkcd.com) *underline* | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) *underline* | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) *underline* | [http://www.google.com](http://www.google.com) *underline* | | **bold** ~~strikethrough~~ | *italic* ~~strikethrough~~ | `code` ~~strikethrough~~ | `verbatim` ~~strikethrough~~ | *underline* ~~strikethrough~~ | ~~strikethrough~~ ~~strikethrough~~ | [http://www.bing.com](http://www.bing.com) ~~strikethrough~~ | [http://www.google.com](http://www.google.com) ~~strikethrough~~ | [helpful text link](http://www.xkcd.com) ~~strikethrough~~ | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ~~strikethrough~~ | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ~~strikethrough~~ | [http://www.google.com](http://www.google.com) ~~strikethrough~~ | | **bold** [http://www.bing.com](http://www.bing.com) | *italic* [http://www.bing.com](http://www.bing.com) | `code` [http://www.bing.com](http://www.bing.com) | `verbatim` [http://www.bing.com](http://www.bing.com) | *underline* [http://www.bing.com](http://www.bing.com) | ~~strikethrough~~ [http://www.bing.com](http://www.bing.com) | [http://www.bing.com](http://www.bing.com) [http://www.bing.com](http://www.bing.com) | [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) | [helpful text link](http://www.xkcd.com) [http://www.bing.com](http://www.bing.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.bing.com](http://www.bing.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.bing.com](http://www.bing.com) | [http://www.google.com](http://www.google.com) [http://www.bing.com](http://www.bing.com) | | **bold** [http://www.google.com](http://www.google.com) | *italic* [http://www.google.com](http://www.google.com) | `code` [http://www.google.com](http://www.google.com) | `verbatim` [http://www.google.com](http://www.google.com) | *underline* [http://www.google.com](http://www.google.com) | ~~strikethrough~~ [http://www.google.com](http://www.google.com) | [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | | **bold** [helpful text link](http://www.xkcd.com) | *italic* [helpful text link](http://www.xkcd.com) | `code` [helpful text link](http://www.xkcd.com) | `verbatim` [helpful text link](http://www.xkcd.com) | *underline* [helpful text link](http://www.xkcd.com) | ~~strikethrough~~ [helpful text link](http://www.xkcd.com) | [http://www.bing.com](http://www.bing.com) [helpful text link](http://www.xkcd.com) | [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) | [helpful text link](http://www.xkcd.com) [helpful text link](http://www.xkcd.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [helpful text link](http://www.xkcd.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [helpful text link](http://www.xkcd.com) | [http://www.google.com](http://www.google.com) [helpful text link](http://www.xkcd.com) | | **bold** [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | *italic* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | `code` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | `verbatim` [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | *underline* [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | ~~strikethrough~~ [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.bing.com](http://www.bing.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [helpful text link](http://www.xkcd.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | [http://www.google.com](http://www.google.com) [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) | | **bold** ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | *italic* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | `code` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | `verbatim` ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | *underline* ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | ~~strikethrough~~ ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.bing.com](http://www.bing.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [helpful text link](http://www.xkcd.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | [http://www.google.com](http://www.google.com) ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) | | **bold** [http://www.google.com](http://www.google.com) | *italic* [http://www.google.com](http://www.google.com) | `code` [http://www.google.com](http://www.google.com) | `verbatim` [http://www.google.com](http://www.google.com) | *underline* [http://www.google.com](http://www.google.com) | ~~strikethrough~~ [http://www.google.com](http://www.google.com) | [http://www.bing.com](http://www.bing.com) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | [helpful text link](http://www.xkcd.com) [http://www.google.com](http://www.google.com) | [http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg](http://farm7.static.flickr.com/6078/6084185195_552aa270b2.jpg) [http://www.google.com](http://www.google.com) | ![http://imgs.xkcd.com/comics/t_cells.png](http://imgs.xkcd.com/comics/t_cells.png) [http://www.google.com](http://www.google.com) | [http://www.google.com](http://www.google.com) [http://www.google.com](http://www.google.com) | ruby-org-0.9.12/spec/markdown_with_custom_markup_examples/incorrect_markup_for_markdown.yml000066400000000000000000000000621257631261400326760ustar00rootroot00000000000000--- :Markdown: "*": "__" "/": "_" "_": "*" ruby-org-0.9.12/spec/output_buffer_spec.rb000066400000000000000000000015031257631261400205410ustar00rootroot00000000000000require 'spec_helper' describe Orgmode::OutputBuffer do it "computes outline level numbering" do output_buffer = Orgmode::OutputBuffer.new "" expect(output_buffer.get_next_headline_number(1)).to eql("1") expect(output_buffer.get_next_headline_number(1)).to eql("2") expect(output_buffer.get_next_headline_number(1)).to eql("3") expect(output_buffer.get_next_headline_number(1)).to eql("4") expect(output_buffer.get_next_headline_number(2)).to eql("4.1") expect(output_buffer.get_next_headline_number(2)).to eql("4.2") expect(output_buffer.get_next_headline_number(1)).to eql("5") expect(output_buffer.get_next_headline_number(2)).to eql("5.1") expect(output_buffer.get_next_headline_number(2)).to eql("5.2") expect(output_buffer.get_next_headline_number(4)).to eql("5.2.0.1") end end ruby-org-0.9.12/spec/parser_spec.rb000066400000000000000000000477021257631261400171570ustar00rootroot00000000000000require 'spec_helper' describe Orgmode::Parser do it "should open ORG files" do parser = Orgmode::Parser.load(RememberFile) end it "should fail on non-existant files" do expect { parser = Orgmode::Parser.load("does-not-exist.org") }.to raise_error end it "should load all of the lines" do parser = Orgmode::Parser.load(RememberFile) expect(parser.lines.length).to eql(53) end it "should find all headlines" do parser = Orgmode::Parser.load(RememberFile) expect(parser.headlines.count).to eq(12) end it "can find a headline by index" do parser = Orgmode::Parser.load(RememberFile) line = parser.headlines[1].to_s expect(line).to eql("** YAML header in Webby\n") end it "should determine headline levels" do parser = Orgmode::Parser.load(RememberFile) expect(parser.headlines[0].level).to eql(1) expect(parser.headlines[1].level).to eql(2) end it "should include the property drawer items from a headline" do parser = Orgmode::Parser.load(FreeformExampleFile) expect(parser.headlines.first.property_drawer.count).to eq(2) expect(parser.headlines.first.property_drawer['DATE']).to eq('2009-11-26') expect(parser.headlines.first.property_drawer['SLUG']).to eq('future-ideas') end it "should put body lines in headlines" do parser = Orgmode::Parser.load(RememberFile) expect(parser.headlines[0].body_lines.count).to eq(1) expect(parser.headlines[1].body_lines.count).to eq(7) end it "should understand lines before the first headline" do parser = Orgmode::Parser.load(FreeformFile) expect(parser.header_lines.count).to eq(22) end it "should load in-buffer settings" do parser = Orgmode::Parser.load(FreeformFile) expect(parser.in_buffer_settings.count).to eq(12) expect(parser.in_buffer_settings["TITLE"]).to eql("Freeform") expect(parser.in_buffer_settings["EMAIL"]).to eql("bdewey@gmail.com") expect(parser.in_buffer_settings["LANGUAGE"]).to eql("en") end it "should understand OPTIONS" do parser = Orgmode::Parser.load(FreeformFile) expect(parser.options.count).to eq(33) expect(parser.options["TeX"]).to eql("t") expect(parser.options["todo"]).to eql("t") expect(parser.options["\\n"]).to eql("nil") expect(parser.options['H']).to eq('3') expect(parser.options['num']).to eq('t') expect(parser.options['toc']).to eq('nil') expect(parser.options['\n']).to eq('nil') expect(parser.options['@']).to eq('t') expect(parser.options[':']).to eq('t') expect(parser.options['|']).to eq('t') expect(parser.options['^']).to eq('t') expect(parser.options['-']).to eq('t') expect(parser.options['f']).to eq('t') expect(parser.options['*']).to eq('t') expect(parser.options['<']).to eq('t') expect(parser.options['TeX']).to eq('t') expect(parser.options['LaTeX']).to eq('nil') expect(parser.options['skip']).to eq('nil') expect(parser.options['todo']).to eq('t') expect(parser.options['pri']).to eq('nil') expect(parser.options['tags']).to eq('not-in-toc') expect(parser.options["'"]).to eq('t') expect(parser.options['arch']).to eq('headline') expect(parser.options['author']).to eq('t') expect(parser.options['c']).to eq('nil') expect(parser.options['creator']).to eq('comment') expect(parser.options['d']).to eq('(not LOGBOOK)') expect(parser.options['date']).to eq('t') expect(parser.options['e']).to eq('t') expect(parser.options['email']).to eq('nil') expect(parser.options['inline']).to eq('t') expect(parser.options['p']).to eq('nil') expect(parser.options['stat']).to eq('t') expect(parser.options['tasks']).to eq('t') expect(parser.options['tex']).to eq('t') expect(parser.options['timestamp']).to eq('t') expect(parser.export_todo?).to be true parser.options.delete("todo") expect(parser.export_todo?).to be false end it "should skip in-buffer settings inside EXAMPLE blocks" do parser = Orgmode::Parser.load(FreeformExampleFile) expect(parser.in_buffer_settings.count).to eq(0) end it "should return a textile string" do parser = Orgmode::Parser.load(FreeformFile) expect(parser.to_textile).to be_kind_of(String) end it "should understand export table option" do fname = File.join(File.dirname(__FILE__), %w[html_examples skip-table.org]) data = IO.read(fname) p = Orgmode::Parser.new(data) expect(p.export_tables?).to be false end it "should add code block name as a line property" do example = < true }) expected = "

    #{org}

    \n" expect(expected).to eq(parser.to_html) end end describe "Export to HTML test cases" do # Dynamic generation of examples from each *.org file in html_examples. # Each of these files is convertable to HTML. data_directory = File.join(File.dirname(__FILE__), "html_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") textile_name = File.join(data_directory, basename + ".html") textile_name = File.expand_path(textile_name) it "should convert #{basename}.org to HTML" do expected = IO.read(textile_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true }) actual = parser.to_html expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end it "should render #{basename}.org to HTML using Tilt templates" do ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] = 'true' expected = IO.read(textile_name) template = Tilt.new(file).render expect(template).to eq(expected) ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] = '' end end it "should not render #+INCLUDE directive when explicitly indicated" do data_directory = File.join(File.dirname(__FILE__), "html_examples") expected = File.read(File.join(data_directory, "include-file-disabled.html")) org_file = File.join(data_directory, "include-file.org") parser = Orgmode::Parser.new(IO.read(org_file), :allow_include_files => false) actual = parser.to_html expect(actual).to eq(expected) end it "should render #+INCLUDE when ORG_RUBY_INCLUDE_ROOT is set" do data_directory = File.expand_path(File.join(File.dirname(__FILE__), "html_examples")) ENV['ORG_RUBY_INCLUDE_ROOT'] = data_directory expected = File.read(File.join(data_directory, "include-file.html")) org_file = File.join(data_directory, "include-file.org") parser = Orgmode::Parser.new(IO.read(org_file)) actual = parser.to_html expect(actual).to eq(expected) ENV['ORG_RUBY_INCLUDE_ROOT'] = nil end end describe "Export to HTML test cases with code syntax highlight disabled" do code_syntax_examples_directory = File.join(File.dirname(__FILE__), "html_code_syntax_highlight_examples") # Do not use syntax coloring for source code blocks org_files = File.expand_path(File.join(code_syntax_examples_directory, "*-no-color.org")) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") org_filename = File.join(code_syntax_examples_directory, basename + ".html") org_filename = File.expand_path(org_filename) it "should convert #{basename}.org to HTML" do expected = IO.read(org_filename) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true, :skip_syntax_highlight => true }) actual = parser.to_html expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end it "should render #{basename}.org to HTML using Tilt templates", :if => (defined? Coderay or defined? Pygments) do ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] = 'true' expected = IO.read(org_filename) template = Tilt.new(file).render expect(template).to eq(expected) ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] = '' end end end ['coderay', 'pygments'].each do |highlighter| if defined? (instance_eval highlighter.capitalize) describe "Export to HTML test cases with code syntax highlight: #{highlighter}" do code_syntax_examples_directory = File.join(File.dirname(__FILE__), "html_code_syntax_highlight_examples") files = [] # Either Pygments or Coderay begin require highlighter rescue LoadError next end org_files = File.expand_path(File.join(code_syntax_examples_directory, "*-#{highlighter}.org")) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") org_filename = File.join(code_syntax_examples_directory, basename + ".html") org_filename = File.expand_path(org_filename) it "should convert #{basename}.org to HTML" do expected = IO.read(org_filename) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), :allow_include_files => true) actual = parser.to_html expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end it "should render #{basename}.org to HTML using Tilt templates" do ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] = 'true' expected = IO.read(org_filename) template = Tilt.new(file).render expect(template).to eq(expected) ENV['ORG_RUBY_ENABLE_INCLUDE_FILES'] = '' end end end end end describe "Export to Markdown test cases" do data_directory = File.join(File.dirname(__FILE__), "markdown_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") markdown_name = File.join(data_directory, basename + ".md") markdown_name = File.expand_path(markdown_name) it "should convert #{basename}.org to Markdown" do expected = IO.read(markdown_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), :allow_include_files => false) actual = parser.to_markdown expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end describe "Export to Markdown with incorrect custom markup test cases" do # The following tests export Markdown to the default markup of org-ruby # since the YAML file only contains the incorrect keys data_directory = File.join(File.dirname(__FILE__), "markdown_with_custom_markup_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") default_html_name = File.join(data_directory, basename + "_default.md") default_html_name = File.expand_path(default_html_name) custom_markup_file = File.join(data_directory, "incorrect_markup_for_markdown.yml") custom_markup_file = File.expand_path(custom_markup_file) it "should convert #{basename}.org to Markdown with the default markup" do expected = IO.read(default_html_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true, :markup_file => custom_markup_file }) actual = parser.to_markdown expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end describe "Export to Markdown with missing custom markup file test cases" do # The following tests export Markdown to the default markup of org-ruby # since the YAML file only contains the incorrect keys data_directory = File.join(File.dirname(__FILE__), "markdown_with_custom_markup_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") default_html_name = File.join(data_directory, basename + "_default.md") default_html_name = File.expand_path(default_html_name) custom_markup_file = File.join(data_directory, "this_file_does_not_exists.yml") custom_markup_file = File.expand_path(custom_markup_file) it "should convert #{basename}.org to Markdown with the default markup" do expected = IO.read(default_html_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true, :markup_file => custom_markup_file }) actual = parser.to_markdown expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end describe "Export to Markdown with custom markup test cases" do data_directory = File.join(File.dirname(__FILE__), "markdown_with_custom_markup_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") markdown_name = File.join(data_directory, basename + ".md") markdown_name = File.expand_path(markdown_name) custom_markup_file = File.join(data_directory, "custom_markup_for_markdown.yml") custom_markup_file = File.expand_path(custom_markup_file) it "should convert #{basename}.org to Markdown with custom markup" do expected = IO.read(markdown_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), {:allow_include_files => false, :markup_file => custom_markup_file }) actual = parser.to_markdown expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end describe "Export to HTML with incorrect custom markup test cases" do # The following tests export HTML to the default markup of org-ruby # since the YAML file only contains the incorrect keys data_directory = File.join(File.dirname(__FILE__), "html_with_custom_markup_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") default_html_name = File.join(data_directory, basename + "_default.html") default_html_name = File.expand_path(default_html_name) custom_markup_file = File.join(data_directory, "incorrect_markup_for_html.yml") custom_markup_file = File.expand_path(custom_markup_file) it "should convert #{basename}.org to HTML with the default markup" do expected = IO.read(default_html_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true, :markup_file => custom_markup_file }) actual = parser.to_html expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end describe "Export to HTML with missing custom markup file test cases" do # The following tests export HTML to the default markup of org-ruby # since the YAML file is missing. data_directory = File.join(File.dirname(__FILE__), "html_with_custom_markup_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") default_html_name = File.join(data_directory, basename + "_default.html") default_html_name = File.expand_path(default_html_name) custom_markup_file = File.join(data_directory, "this_file_does_not_exists.yml") custom_markup_file = File.expand_path(custom_markup_file) it "should convert #{basename}.org to HTML with the default markup" do expected = IO.read(default_html_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true, :markup_file => custom_markup_file }) actual = parser.to_html expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end describe "Export to HTML with custom markup test cases" do data_directory = File.join(File.dirname(__FILE__), "html_with_custom_markup_examples") org_files = File.expand_path(File.join(data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| basename = File.basename(file, ".org") custom_html_name = File.join(data_directory, basename + ".html") custom_html_name = File.expand_path(custom_html_name) custom_markup_file = File.join(data_directory, "custom_markup_for_html.yml") custom_markup_file = File.expand_path(custom_markup_file) it "should convert #{basename}.org to HTML with custom markup" do expected = IO.read(custom_html_name) expect(expected).to be_kind_of(String) parser = Orgmode::Parser.new(IO.read(file), { :allow_include_files => true, :markup_file => custom_markup_file }) actual = parser.to_html expect(actual).to be_kind_of(String) expect(actual).to eq(expected) end end end end ruby-org-0.9.12/spec/regexp_helper_spec.rb000066400000000000000000000036021257631261400205030ustar00rootroot00000000000000require 'spec_helper' describe Orgmode::RegexpHelper do it "should recognize simple markup" do e = Orgmode::RegexpHelper.new total = 0 e.match_all("/italic/") do |border, string| expect(border).to eql("/") expect(string).to eql("italic") total += 1 end expect(total).to eql(1) total = 0 borders = %w[* / ~] strings = %w[bold italic verbatim] e.match_all("This string contains *bold*, /italic/, and ~verbatim~ text.")\ do |border, str| expect(border).to eql(borders[total]) expect(str).to eql(strings[total]) total += 1 end expect(total).to eql(3) end it "should not get confused by links" do e = Orgmode::RegexpHelper.new total = 0 # Make sure the slashes in these links aren't treated as italics e.match_all("[[http://www.bing.com/twitter]]") do |border, str| total += 1 end expect(total).to eql(0) end it "should correctly perform substitutions" do e = Orgmode::RegexpHelper.new map = { "*" => "strong", "/" => "i", "~" => "code" } n = e.rewrite_emphasis("This string contains *bold*, /italic/, and ~verbatim~ text.") do |border, str| "<#{map[border]}>#{str}" end n = e.restore_code_snippets n expect(n).to eql("This string contains bold, italic, and verbatim text.") end it "should allow link rewriting" do e = Orgmode::RegexpHelper.new str = e.rewrite_links("[[http://www.bing.com]]") do |link,text| text ||= link "\"#{text}\":#{link}" end expect(str).to eql("\"http://www.bing.com\":http://www.bing.com") str = e.rewrite_links("") do |link| "\"#{link}\":#{link}" end expect(str).to eql("\"http://www.google.com\":http://www.google.com") end end # describe Orgmode::RegexpHelper ruby-org-0.9.12/spec/spec_helper.rb000066400000000000000000000010241257631261400171250ustar00rootroot00000000000000require 'org-ruby' RememberFile = File.join(File.dirname(__FILE__), %w[data remember.org]) FreeformFile = File.join(File.dirname(__FILE__), %w[data freeform.org]) FreeformExampleFile = File.join(File.dirname(__FILE__), %w[data freeform-example.org]) RSpec.configure do |config| # == Mock Framework # # RSpec uses it's own mocking framework by default. If you prefer to # use mocha, flexmock or RR, uncomment the appropriate line: # # config.mock_with :mocha # config.mock_with :flexmock # config.mock_with :rr end ruby-org-0.9.12/spec/textile_examples/000077500000000000000000000000001257631261400176665ustar00rootroot00000000000000ruby-org-0.9.12/spec/textile_examples/block_code.org000066400000000000000000000011521257631261400224620ustar00rootroot00000000000000* Block Code I need to get block code examples working. In =orgmode=, they look like this: #+BEGIN_EXAMPLE def initialize(output) @output = output @buffer = "" @output_type = :start @list_indent_stack = [] @paragraph_modifier = nil @logger = Logger.new(STDERR) @logger.level = Logger::WARN end #+END_EXAMPLE And now I should be back to normal text. Putting in another paragraph for good measure. Code should also get cancelled by a list, thus: #+BEGIN_EXAMPLE This is my code! Another line! #+END_EXAMPLE - My list should cancel this. - Another list line. ruby-org-0.9.12/spec/textile_examples/block_code.textile000066400000000000000000000011031257631261400233450ustar00rootroot00000000000000h1. Block Code p. I need to get block code examples working. In @orgmode@, they look like this: bc. def initialize(output) @output = output @buffer = "" @output_type = :start @list_indent_stack = [] @paragraph_modifier = nil @logger = Logger.new(STDERR) @logger.level = Logger::WARN end p. And now I should be back to normal text. p. Putting in another paragraph for good measure. p. Code should also get cancelled by a list, thus: bc. This is my code! Another line! * My list should cancel this. * Another list line. ruby-org-0.9.12/spec/textile_examples/blockquote.org000066400000000000000000000002261257631261400225470ustar00rootroot00000000000000BLOCKQUOTE Testing that I can have block quotes: #+BEGIN_QUOTE /Example:/ This is blockquote text. #+END_QUOTE And now I'm back to normal text! ruby-org-0.9.12/spec/textile_examples/blockquote.textile000066400000000000000000000002171257631261400234360ustar00rootroot00000000000000p. BLOCKQUOTE p. Testing that I can have block quotes: bq. _Example:_ bq. This is blockquote text. p. And now I'm back to normal text! ruby-org-0.9.12/spec/textile_examples/center.org000066400000000000000000000001161257631261400216550ustar00rootroot00000000000000#+TITLE: Fou not center #+BEGIN_CENTER center #+END_CENTER not center, again ruby-org-0.9.12/spec/textile_examples/center.textile000066400000000000000000000000611257631261400225430ustar00rootroot00000000000000 p. not center p=. center p. not center, again ruby-org-0.9.12/spec/textile_examples/footnotes.org000066400000000000000000000004421257631261400224170ustar00rootroot00000000000000#+TITLE: Footnotes #+OPTIONS: f:t * Footnotes Using numbers [fn:0] Using letters and not defined in the footnote [fn:abc] Using letters and defined in the footnote [fn:abc:definition of abc] Defined in the footnote itself with markup [fn:1:*blub*] [fn:0] Definition of first footnote ruby-org-0.9.12/spec/textile_examples/footnotes.textile000066400000000000000000000004451257631261400233110ustar00rootroot00000000000000 h1. Footnotes p. Using numbers [0] p. Using letters and not defined in the footnote [1] p. Using letters and defined in the footnote [1] p. Defined in the footnote itself with markup [2] p. [0] Definition of first footnote fn0. DEFINITION NOT FOUND fn1. definition of abc fn2. *blub* ruby-org-0.9.12/spec/textile_examples/keywords.org000066400000000000000000000005251257631261400222500ustar00rootroot00000000000000KEYWORDS By default, I don't want keywords exported to textile. * DONE Recognize standard keywords CLOSED: [2009-12-21 Mon 15:23] The standard =orgmode= keywords are TODO and DONE. Recognize those. * TODO Recongize buffer-specific keywords There's a way to define a custom keyword list in a buffer. Research that and handle it. ruby-org-0.9.12/spec/textile_examples/keywords.textile000066400000000000000000000004641257631261400231410ustar00rootroot00000000000000p. KEYWORDS p. By default, I don't want keywords exported to textile. h1. Recognize standard keywords p. The standard @orgmode@ keywords are TODO and DONE. Recognize those. h1. Recongize buffer-specific keywords p. There's a way to define a custom keyword list in a buffer. Research that and handle it. ruby-org-0.9.12/spec/textile_examples/links.org000066400000000000000000000003501257631261400215150ustar00rootroot00000000000000LINKS [[http://www.bing.com]] * Supported Link Styles - [[http://www.hotmail.com]] => Simple - [[http://www.hotmail.com][Hotmail]] => With link text - [[http://url/with spaces][with spaces]] - [[http://url/with spaces]] ruby-org-0.9.12/spec/textile_examples/links.textile000066400000000000000000000004411257631261400224050ustar00rootroot00000000000000p. LINKS p. "http://www.bing.com":http://www.bing.com h1. Supported Link Styles * "http://www.hotmail.com":http://www.hotmail.com => Simple * "Hotmail":http://www.hotmail.com => With link text * "with spaces":http://url/with%20spaces * "http://url/with spaces":http://url/with%20spaces ruby-org-0.9.12/spec/textile_examples/lists.org000066400000000000000000000027211257631261400215370ustar00rootroot00000000000000* Lists I want to make sure I have great support for lists. - This is an unordered list - This continues the unordered list And this is a paragraph *after* the list. ** Wrapping within the list - This is a single-line list item in the org file. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - And this is the next item. The previous item needs to be on one line to keep =textile= happy. - Ditto the previous line, actually. ** Edge cases - This is a single-line list. And this is a *separate paragraph.* Note the indentation in the org file. ruby-org-0.9.12/spec/textile_examples/lists.textile000066400000000000000000000025761257631261400224360ustar00rootroot00000000000000h1. Lists p. I want to make sure I have great support for lists. * This is an unordered list * This continues the unordered list p. And this is a paragraph *after* the list. h2. Wrapping within the list * This is a single-line list item in the org file. * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * And this is the next item. The previous item needs to be on one line to keep @textile@ happy. * Ditto the previous line, actually. h2. Edge cases * This is a single-line list. p. And this is a *separate paragraph.* Note the indentation in the org file. ruby-org-0.9.12/spec/textile_examples/single-space-plain-list.org000066400000000000000000000007041257631261400250240ustar00rootroot00000000000000** Anatomy of a BVP Each BVP followed a simple, one-page template with the following parts: - Customer Summary - Storyboard - Requirements - Partner teams The following sections walk through each section and give an example from one of our BVPs, [[http://windows/hyper-v/initiatives/Value Propositions/DynamicDatacenter-ValueProp.docx][Resource-Smart Virtualization Infrastructure]] (also called /Dynamic Datacenter/). ruby-org-0.9.12/spec/textile_examples/single-space-plain-list.textile000066400000000000000000000006541257631261400257170ustar00rootroot00000000000000h2. Anatomy of a BVP p. Each BVP followed a simple, one-page template with the following parts: * Customer Summary * Storyboard * Requirements * Partner teams p. The following sections walk through each section and give an example from one of our BVPs, "Resource-Smart Virtualization Infrastructure":http://windows/hyper-v/initiatives/Value%20Propositions/DynamicDatacenter-ValueProp.docx (also called _Dynamic Datacenter_). ruby-org-0.9.12/spec/textile_examples/tables.org000066400000000000000000000017751257631261400216630ustar00rootroot00000000000000TABLES Different types of ORG tables. * Simple table, no header. | Cell one | Cell two | | Cell three | Cell four | * Indented table | Cell one | | Cell two | And here's some paragraph content. The line breaks will need to get removed here, but not for the tables. * Table with header | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | The separator row should not get printed out. * Table with complete box |-------+-------+-------| | One | Two | Three | |-------+-------+-------| | Four | Five | Six | | Seven | Eight | Nine | |-------+-------+-------| Only the first row should be a header row. * Table with extra lines |-------+--------+--------| | One | Two | Three | |-------+--------+--------| | Four | Five | Six | | Seven | Eight | Nine | |-------+--------+--------| | Ten | Eleven | Twelve | |-------+--------+--------| Only the first row should be a header row. ruby-org-0.9.12/spec/textile_examples/tables.textile000066400000000000000000000014171257631261400225430ustar00rootroot00000000000000p. TABLES p. Different types of ORG tables. h1. Simple table, no header. | Cell one | Cell two | | Cell three | Cell four | h1. Indented table | Cell one | | Cell two | p. And here's some paragraph content. The line breaks will need to get removed here, but not for the tables. h1. Table with header | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | p. The separator row should not get printed out. h1. Table with complete box | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | p. Only the first row should be a header row. h1. Table with extra lines | One | Two | Three | | Four | Five | Six | | Seven | Eight | Nine | | Ten | Eleven | Twelve | p. Only the first row should be a header row. ruby-org-0.9.12/spec/textile_output_buffer_spec.rb000066400000000000000000000014111257631261400222750ustar00rootroot00000000000000require 'spec_helper' describe Orgmode::TextileOutputBuffer do it "should substitute / with _" do expect(Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/")).to eql("_italic_") end it "should convert simple links" do expect(Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]")).to \ eql("\"http://www.google.com\":http://www.google.com") end it "should convert links with text" do expect(Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]")).to \ eql("\"Google\":http://www.google.com") end it "should convert spaces in urls" do expect(Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]")).to eql("\"my url\":my%20url") end end ruby-org-0.9.12/tasks/000077500000000000000000000000001257631261400145055ustar00rootroot00000000000000ruby-org-0.9.12/tasks/test_case.rake000066400000000000000000000064131257631261400173270ustar00rootroot00000000000000require 'org-ruby' namespace :testcase do @data_directory = File.join(File.dirname(__FILE__), "../spec/html_examples") desc "List all of the current HTML test cases" task :list do org_files = File.expand_path(File.join(@data_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| puts File.basename(file, ".org") end end desc "Accept the current org-ruby output for the test case as correct" task :accept, :case do |t, args| basename = args[:case] raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename fname = File.expand_path(File.join(@data_directory, "#{basename}.org")) oname = File.expand_path(File.join(@data_directory, "#{basename}.html")) data = IO.read(fname) puts "=== #{fname} is: ===>>>\n\n" puts data puts "\n\n=== ACCEPTING OUTPUT: ===>>>\n\n" p = Orgmode::Parser.new(data) puts p.to_html File.open(oname, "w") do |s| s.write(p.to_html) end end desc "Look at the current org-ruby output for a test case" task :inspect, :case do |t, args| basename = args[:case] raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename fname = File.expand_path(File.join(@data_directory, "#{basename}.org")) data = IO.read(fname) puts "=== #{fname} is: ===>>>\n\n" puts data puts "\n\n=== #{fname} converts to: ===>>>\n\n" p = Orgmode::Parser.new(data) puts p.to_html end # Special namespace to test syntax highlighting with different technologies namespace :highlight do @code_syntax_examples_directory = File.join(File.dirname(__FILE__), "../spec/html_code_syntax_highlight_examples") desc "List all of the current HTML test cases" task :list do org_files = File.expand_path(File.join(@code_syntax_examples_directory, "*.org" )) files = Dir.glob(org_files) files.each do |file| puts File.basename(file, ".org") end end desc "Special tests cases for code syntax highlight support" task :accept, :case do |t, args| basename = args[:case] raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename fname = File.expand_path(File.join(@code_syntax_examples_directory, "#{basename}.org")) oname = File.expand_path(File.join(@code_syntax_examples_directory, "#{basename}.html")) data = IO.read(fname) puts "=== #{fname} is: ===>>>\n\n" puts data puts "\n\n=== ACCEPTING OUTPUT: ===>>>\n\n" p = Orgmode::Parser.new(data) puts p.to_html File.open(oname, "w") do |s| s.write(p.to_html) end end desc "Inspect code syntax highlight support" task :inspect, :case do |t, args| basename = args[:case] raise "Must supply a test case name. Example: rake testcase:inspecthighlight[casename]" unless basename fname = File.expand_path(File.join(@code_syntax_examples_directory, "#{basename}.org")) data = IO.read(fname) puts "=== #{fname} is: ===>>>\n\n" puts data puts "\n\n=== #{fname} converts to: ===>>>\n\n" p = Orgmode::Parser.new(data) puts p.to_html end end end desc "Alias for testcase:list" task :testcase => ["testcase:list"] ruby-org-0.9.12/util/000077500000000000000000000000001257631261400143355ustar00rootroot00000000000000ruby-org-0.9.12/util/gen-special-replace.el000066400000000000000000000042561257631261400204660ustar00rootroot00000000000000;; This code creates ruby code to replace special symbols with the corresponding utf8/html code (require 'org-entities) (defvar gen-use-entities-user t) (defvar gen-file-name "replace-entities.rb") (defun generate-replace-inbuffer (what) (insert " " (capitalize what) "Entities = {\n") (let ((ll (if gen-use-entities-user (append org-entities-user org-entities) org-entities)) (to (if (string= what "html") 3 6)) ; use utf8 for textile (beg (point))) (insert (mapconcat (lambda (entity) (let ((symb (nth to entity))) ;; escape backslashes and quotation marks (setq symb (replace-regexp-in-string "\\(\\\\\\|\\\"\\)" "\\\\\\&" symb)) ;; escape percent marks from further formatting (setq symb (replace-regexp-in-string "%" "%%" symb)) (concat " \"" (car entity) "\" => \"" symb "\""))) (remove-if-not 'listp ll) ",\n") "\n") (align-regexp beg (point) "\\(\\s-+\\)=>" 1 1 t)) (insert " }\n")) (defun generate-replace-header (what) (insert "# Autogenerated by util/gen-special-replace.el\n\n" "module Orgmode\n")) (defun generate-replace-footer (what) (insert " @org_entities_regexp = /\\\\(there4|sup[123]|frac[13][24]|[a-zA-Z]+)($|\\{\\}|[^a-zA-Z])/\n\n" " def Orgmode.special_symbols_to_" what " str\n" " str.gsub! @org_entities_regexp do |match|\n" " if " (capitalize what) "Entities[$1]\n" " if $2 == \"{}\" then \"#{" (capitalize what) "Entities[$1]}\"\n" " else \"#{" (capitalize what) "Entities[$1]}#{$2}\"\n" " end\n" " else\n" " $&\n" " end\n" " end\n" " end\n" "end # module Orgmode\n")) (defun generate-replace (file-name what) (let ((file (expand-file-name file-name))) (with-temp-buffer (generate-replace-header what) (generate-replace-inbuffer what) (generate-replace-footer what) (write-file file)))) (generate-replace "../lib/org-ruby/html_symbol_replace.rb" "html") (generate-replace "../lib/org-ruby/textile_symbol_replace.rb" "textile")