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

Output of test json does not match spec for 0.26 #423

Closed
kevmoo opened this issue Aug 8, 2016 · 2 comments
Closed

Output of test json does not match spec for 0.26 #423

kevmoo opened this issue Aug 8, 2016 · 2 comments

Comments

@kevmoo
Copy link

kevmoo commented Aug 8, 2016

Example 561

http://spec.commonmark.org/0.26/#example-561 has it as

<irc://foo.bar:2233/baz>

But when I dump the tests to json (at the 0.26 tag 91e045c) I get

  {
    "example": 561,
    "markdown": "<http://foo.bar.baz/test?q=hello&id=22&boolean>\n",
    "start_line": 8337,
    "section": "Autolinks",
    "html": "<p><a href=\"http://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean\">http://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean</a></p>\n",
    "end_line": 8341
  }

Am I doing something wrong?

@kevmoo
Copy link
Author

kevmoo commented Aug 8, 2016

The off-by-one seems to start with Lists.

262 is the first one in the html and the json output. file:///Users/kevmoo/source/github/common_mark/spec.html#example-262

285 is the last example in the html - file:///Users/kevmoo/source/github/common_mark/spec.html#example-285

But 286 shows up in the JSON – and we're off-by-one on all of the after

  {
    "example": 286,
    "markdown": "- a\n  - b\n  - c\n\n- d\n  - e\n  - f\n",
    "start_line": 5288,
    "section": "Lists",
    "html": "<ul>\n<li>\n<p>a</p>\n<ul>\n<li>b</li>\n<li>c</li>\n</ul>\n</li>\n<li>\n<p>d</p>\n<ul>\n<li>e</li>\n<li>f</li>\n</ul>\n</li>\n</ul>\n",
    "end_line": 5313
  }

@kevmoo
Copy link
Author

kevmoo commented Aug 8, 2016

Further digging. This is showing up in the json output.

  {
    "example": 265,
    "markdown": "",
    "start_line": 0,
    "section": "Lists",
    "html": "",
    "end_line": 4815
  }

kevmoo added a commit to kevmoo/CommonMark that referenced this issue Aug 8, 2016
@jgm jgm closed this as completed in e834e4b Aug 8, 2016
kevmoo added a commit to dart-lang/markdown that referenced this issue Aug 8, 2016
commonmark/commonmark-spec#423

The json output contained an invalid entry that added an invalid test
and made the examples numbers off-by-one compared to the spec html

Generated from commonmark/commonmark-spec@d64dc44
Which has no test changes since 0.26 tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant