diff --git a/test/specs/gfm/getSpecs.js b/test/specs/gfm/getSpecs.js index 9d748ff2bc..2746bdbbcb 100644 --- a/test/specs/gfm/getSpecs.js +++ b/test/specs/gfm/getSpecs.js @@ -16,7 +16,7 @@ fetch('https://github.github.com/gfm/') $('.extension').each((i, ext) => { const section = $('.definition', ext).text().trim().replace(/^\d+\.\d+(.*?) \(extension\)[\s\S]*$/, '$1'); $('.example', ext).each((j, exa) => { - const example = $(exa).attr('id').replace(/\D/g, ''); + const example = +$(exa).attr('id').replace(/\D/g, ''); const markdown = $('.language-markdown', exa).text().trim(); const html = $('.language-html', exa).text().trim(); specs.push({ diff --git a/test/specs/gfm/gfm.0.29.json b/test/specs/gfm/gfm.0.29.json index 28ffd8b97e..7d1d43e4b6 100644 --- a/test/specs/gfm/gfm.0.29.json +++ b/test/specs/gfm/gfm.0.29.json @@ -3,145 +3,145 @@ "section": "Tables", "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n
foobar
bazbim
", "markdown": "| foo | bar |\n| --- | --- |\n| baz | bim |", - "example": "198" + "example": 198 }, { "section": "Tables", "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n
abcdefghi
barbaz
", "markdown": "| abc | defghi |\n:-: | -----------:\nbar | baz", - "example": "199" + "example": 199 }, { "section": "Tables", "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n
f|oo
b | az
b | im
", "markdown": "| f\\|oo |\n| ------ |\n| b `\\|` az |\n| b **\\|** im |", - "example": "200" + "example": 200 }, { "section": "Tables", "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n
abcdef
barbaz
\n
\n

bar

\n
", "markdown": "| abc | def |\n| --- | --- |\n| bar | baz |\n> bar", - "example": "201" + "example": 201 }, { "section": "Tables", "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
abcdef
barbaz
bar
\n

bar

", "markdown": "| abc | def |\n| --- | --- |\n| bar | baz |\nbar\n\nbar", - "example": "202" + "example": 202 }, { "section": "Tables", "html": "

| abc | def |\n| --- |\n| bar |

", "markdown": "| abc | def |\n| --- |\n| bar |", - "example": "203" + "example": 203 }, { "section": "Tables", "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
abcdef
bar
barbaz
", "markdown": "| abc | def |\n| --- | --- |\n| bar |\n| bar | baz | boo |", - "example": "204" + "example": 204 }, { "section": "Tables", "html": "\n\n\n\n\n\n\n
abcdef
", "markdown": "| abc | def |\n| --- | --- |", - "example": "205" + "example": 205 }, { "section": "Task list items", "html": "", "markdown": "- [ ] foo\n- [x] bar", - "example": "279" + "example": 279 }, { "section": "Task list items", "html": "", "markdown": "- [x] foo\n - [ ] bar\n - [x] baz\n- [ ] bim", - "example": "280" + "example": 280 }, { "section": "Strikethrough", "html": "

Hi Hello, world!

", "markdown": "~~Hi~~ Hello, world!", - "example": "491" + "example": 491 }, { "section": "Strikethrough", "html": "

This ~~has a

\n

new paragraph~~.

", "markdown": "This ~~has a\n\nnew paragraph~~.", - "example": "492" + "example": 492 }, { "section": "Autolinks", "html": "

www.commonmark.org

", "markdown": "www.commonmark.org", - "example": "621" + "example": 621 }, { "section": "Autolinks", "html": "

Visit www.commonmark.org/help for more information.

", "markdown": "Visit www.commonmark.org/help for more information.", - "example": "622" + "example": 622 }, { "section": "Autolinks", "html": "

Visit www.commonmark.org.

\n

Visit www.commonmark.org/a.b.

", "markdown": "Visit www.commonmark.org.\n\nVisit www.commonmark.org/a.b.", - "example": "623" + "example": 623 }, { "section": "Autolinks", "html": "

www.google.com/search?q=Markup+(business)

\n

(www.google.com/search?q=Markup+(business))

", "markdown": "www.google.com/search?q=Markup+(business)\n\n(www.google.com/search?q=Markup+(business))", - "example": "624" + "example": 624 }, { "section": "Autolinks", "html": "

www.google.com/search?q=(business))+ok

", "markdown": "www.google.com/search?q=(business))+ok", - "example": "625" + "example": 625 }, { "section": "Autolinks", "html": "

www.google.com/search?q=commonmark&hl=en

\n

www.google.com/search?q=commonmark&hl;

", "markdown": "www.google.com/search?q=commonmark&hl=en\n\nwww.google.com/search?q=commonmark&hl;", - "example": "626" + "example": 626 }, { "section": "Autolinks", "html": "

www.commonmark.org/he<lp

", "markdown": "www.commonmark.org/hehttp://commonmark.org

\n

(Visit https://encrypted.google.com/search?q=Markup+(business))

\n

Anonymous FTP is available at ftp://foo.bar.baz.

", "markdown": "http://commonmark.org\n\n(Visit https://encrypted.google.com/search?q=Markup+(business))\n\nAnonymous FTP is available at ftp://foo.bar.baz.", - "example": "628" + "example": 628 }, { "section": "Autolinks", "html": "

foo@bar.baz

", "markdown": "foo@bar.baz", - "example": "629" + "example": 629 }, { "section": "Autolinks", "html": "

hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.

", "markdown": "hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.", - "example": "630" + "example": 630 }, { "section": "Autolinks", "html": "

a.b-c_d@a.b

\n

a.b-c_d@a.b.

\n

a.b-c_d@a.b-

\n

a.b-c_d@a.b_

", "markdown": "a.b-c_d@a.b\n\na.b-c_d@a.b.\n\na.b-c_d@a.b-\n\na.b-c_d@a.b_", - "example": "631" + "example": 631 }, { "section": "Disallowed Raw HTML", "html": "

<title> <style>

\n
\n <xmp> is disallowed. <XMP> is also disallowed.\n
", "markdown": " <style> <em>\n\n<blockquote>\n <xmp> is disallowed. <XMP> is also disallowed.\n</blockquote>", - "example": "653", + "example": 653, "shouldFail": true } ]