Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception caused by Partial Table input #39

Closed
OverZealous opened this issue Nov 16, 2011 · 1 comment
Closed

Exception caused by Partial Table input #39

OverZealous opened this issue Nov 16, 2011 · 1 comment
Labels

Comments

@OverZealous
Copy link

Here's a simple example of input that can cause an exception when Tables are enabled:

| H1 | h2|
|--

Also:

| H1 | h2|
|--|

But this works:

| H1 | h2|
|--|--

The exact error message is:

java.lang.IndexOutOfBoundsException: index (1) must be less than size (1)
    at org.parboiled.common.Preconditions.checkElementIndex(Preconditions.java:274)
    at org.parboiled.common.Preconditions.checkElementIndex(Preconditions.java:254)
    at org.parboiled.common.ImmutableList$SingleElementList.get(ImmutableList.java:61)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:234)
    at org.pegdown.ast.TableCellNode.accept(TableCellNode.java:35)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:322)
    at org.pegdown.ToHtmlSerializer.printIndentedTag(ToHtmlSerializer.java:340)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:278)
    at org.pegdown.ast.TableRowNode.accept(TableRowNode.java:25)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:322)
    at org.pegdown.ToHtmlSerializer.printIndentedTag(ToHtmlSerializer.java:340)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:266)
    at org.pegdown.ast.TableHeaderNode.accept(TableHeaderNode.java:25)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:322)
    at org.pegdown.ToHtmlSerializer.printIndentedTag(ToHtmlSerializer.java:340)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:272)
    at org.pegdown.ast.TableNode.accept(TableNode.java:43)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:322)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:66)
    at org.pegdown.ast.RootNode.accept(RootNode.java:51)
    at org.pegdown.ToHtmlSerializer.toHtml(ToHtmlSerializer.java:47)
    at org.pegdown.PegDownProcessor.markdownToHtml(PegDownProcessor.java:100)
    at org.pegdown.PegDownProcessor.markdownToHtml(PegDownProcessor.java:88)
    at org.pegdown.PegDownProcessor.markdownToHtml(PegDownProcessor.java:67)
    ...
@sirthias
Copy link
Owner

Ouch!
Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants