evilstreak / markdown-js

A Markdown parser for javascript
7.7k stars 863 forks source link

Maruku/meta/list tests fail #26

Open kragen opened 13 years ago

kragen commented 13 years ago

edit: Ash renamed the bug to talk about the failure, not the error in the runner which is now fixed.

Checked out trunk (8b3cc2fba7) and with patr v0.2.6 and promised-io v0.2.3, I get the above. Modified the test to be more verbose, and in more detail:

AssertionError: Failed with error on /home/kragen/devel/markdown-js/test/features/meta/list.text: AssertionError: list; expected:
["html",
  ["ul",
    { "id" : "list" },
    ["li",
      "here's a\nloose list"
    ],
    ["li",
      "it might confuse the\nblock_meta routine"
    ]
  ]
]
got:
[
  "html",
  [
    "ul",
    [
      "li",
      [
        "p",
        "here's a\nloose list"
      ]
    ],
    [
      "li",
      [
        "p",
        "it might confuse the\nblock_meta routine\n{: #list}"
      ]
    ]
  ]
]

Despite the suggestion in the paragraph itself, the problem does not seem to be in Markdown.dialects.Maruku.block.block_meta; somehow, mysteriously, processBlock is not getting called for the last block, and so neither is block_meta.

ashb commented 13 years ago

Hmmmm - ISTR that we left that in as a TODO without marking it as such.

Oh and feel free to use a different test library than patr (I just picked that as it needed the fewest changes).

kragen commented 13 years ago

I don't know enough about the current state of JS regression testing libraries to have anything I prefer to patr :)

ashb commented 12 years ago

Switched over to node-tap and marked this test as a TODO.

Looking at the issue now. Its to do with how lists munge the next block without going through a full processBlock loop.