≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #818

Bug #818: Broken blockquote tags when immediately following blockquote shorthand

Kind bug
Product wikitext
When Created 2008-05-27T16:17:35Z, updated 2009-03-27T09:00:46Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

The following IRB session illustrates the problem:

$ irb -r wikitext
>> parser = Wikitext::Parser.new
=> #<Wikitext::Parser:0x34d910 @internal_link_prefix="/wiki/", @minimum_fulltext_token_length=3, @treat_slash_as_special=true, @mailto_class="mailto", @img_prefix="/images/", @line_ending="\n", @space_to_underscore=false, @autolink=true, @external_link_class="external">
>> input = <<END
> foo
<blockquote>bar</blockquote>
END
=> "> foo\n<blockquote>bar</blockquote>\n"
>> puts parser.parse(input)
<blockquote>
  <p>foo</p>
</blockquote>
<p>&lt;blockquote&gt;bar&lt;/blockquote&gt;</p>
=> nil

Note how the blockquote tags get treated as illegal in that context and outputted literally (using entities) in a new paragraph. This doesn't happen if there is an intervening blank line, which is evidently the correct behaviour. I think the former case should be made to match the later. I wouldn't be surprised if a similar issue exists for pre tags and shorthand as well.

Comments

  1. Greg Hurrell 2009-03-26T20:02:59Z

    Time for a bump. Just tested version 1.5.1 to double-check that the problem was still there and it is.

  2. Greg Hurrell 2009-03-27T08:17:07Z

    Just tested:

     foo
    <pre>bar</pre>

    Works fine, but:

    > foo
    <pre>bar</pre>

    Suffers from the same flaw.

  3. Greg Hurrell 2009-03-27T09:00:29Z

    Ok, fixed now. Also handles nested input like:

    >> foo
    <pre>bar</pre>

    And:

    >>> foo
    <pre>bar</pre>

    etc.

    The fix will be included in the 1.5.2 release.

    Marking this one as closed.

  4. Greg Hurrell 2009-03-27T09:00:46Z

    Status changed:

    • From: Open
    • To: Closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets