jupyter / jupyter_markdown

Documentation and tests related to Jupyter's Markdown syntax
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Use the commonmark spec.json #12

Open mpacer opened 6 years ago

mpacer commented 6 years ago

The current spec.json file is not for commonmark as can be seen in https://github.com/jupyter/jupyter_markdown/blob/master/spec.json#L1694-L1704:

  {
    "markdown": "| foo | bar |\n| --- | --- |\n| baz | bim |\n",
    "html": "<table>\n<thead>\n<tr>\n<th>foo</th>\n<th>bar</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>baz</td>\n<td>bim</td>\n</tr></tbody></table>\n",
    "example": 189,
    "start_line": 3197,
    "end_line": 3214,
    "section": "Tables (extension)",
    "extensions": [
      "table"
    ]
  },

In the commonmark spec.json there are no extensions included which makes me think that the current example is derived from github flavoured markdown, not commonmark.

This should be easily avoided by completed #4, but if someone wanted to pursue this instead hardcoding the commonmark 0.27 spec.json in this repo, this technically is a separate issue.