-// Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
+// Copyright 2007-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:
case PATH:
if (IN_ANY_OF(NO_WIKI_START, PRE, PRE_START))
+ {
+ wiki_emit_pending_crlf_if_necessary(parser);
str_append(parser->output, token->start, TOKEN_LEN(token));
+ }
else if (IN(EXT_LINK_START))
{
if (parser->link_target->len == 0)
# 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:
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