]> git.wincent.com - wikitext.git/blobdiff - spec/regressions_spec.rb
Fix for lines beginning with slashes in PRE blocks
[wikitext.git] / spec / regressions_spec.rb
index 6ba4860d4fe44f5a7e7186113ce9f64ab9f18b9e..698cbd47a6b08206a755d3a0e2dc4a4d84e28723 100644 (file)
@@ -1,5 +1,5 @@
 # encoding: utf-8
-# Copyright 2008-2010 Wincent Colaiuta. All rights reserved.
+# Copyright 2008-2011 Wincent Colaiuta. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
@@ -890,4 +890,10 @@ describe Wikitext::Parser, 'regressions' do
     expected = %Q{<p>[<a href="http://foo.com" class="external">http://foo.com</a>]</p>\n}
     @parser.parse('[http://foo.com]').should == expected
   end
+
+  # https://wincent.com/issues/1891
+  it 'handles shorthand PRE blocks containing lines starting with slashes' do
+    expected = "<pre>/a\n/b\n/c</pre>\n"
+    @parser.parse(" /a\n /b\n /c").should == expected
+  end
 end