Skip to content

Commit

Permalink
Merge branch 'skip-rubypants-pass' into release-0.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyqs committed Dec 9, 2014
2 parents 37749b2 + bbab8e6 commit c4a4aa5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/org-ruby/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ def to_html
end
output << "\n"

rp = RubyPants.new(output)
return output if @parser_options[:skip_rubypants_pass]

rp = RubyPants.new(output)
rp.to_html
end

Expand Down
9 changes: 9 additions & 0 deletions spec/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@
end
end

describe "Make it possible to disable rubypants pass" do
it "should allow the raw dash" do
org = "This is a dash -- that will remain as is."
parser = Orgmode::Parser.new(org, { :skip_rubypants_pass => true })
expected = "<p>#{org}</p>\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.
Expand Down

0 comments on commit c4a4aa5

Please sign in to comment.