add space to task regex and disable xhtml for gfm testing
This commit is contained in:
parent
409cb0d841
commit
aa73bb6ea7
@ -370,7 +370,7 @@ Lexer.prototype.token = function(src, top) {
|
|||||||
ischecked = undefined;
|
ischecked = undefined;
|
||||||
if (istask) {
|
if (istask) {
|
||||||
ischecked = item[1] !== ' ';
|
ischecked = item[1] !== ' ';
|
||||||
item = item.replace(/^\[[ xX]\] */, '');
|
item = item.replace(/^\[[ xX]\] +/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tokens.push({
|
this.tokens.push({
|
||||||
|
@ -15,8 +15,7 @@ Messenger.prototype.test = function(spec, section, ignore) {
|
|||||||
var shouldFail = ~ignore.indexOf(spec.example);
|
var shouldFail = ~ignore.indexOf(spec.example);
|
||||||
it('should ' + (shouldFail ? 'fail' : 'pass') + ' example ' + spec.example, function() {
|
it('should ' + (shouldFail ? 'fail' : 'pass') + ' example ' + spec.example, function() {
|
||||||
var expected = spec.html;
|
var expected = spec.html;
|
||||||
var usexhtml = typeof spec.xhtml === 'boolean' ? spec.xhtml : true;
|
var actual = marked(spec.markdown, { headerIds: false, xhtml: false });
|
||||||
var actual = marked(spec.markdown, { headerIds: false, xhtml: usexhtml });
|
|
||||||
since(messenger.message(spec, expected, actual)).expect(
|
since(messenger.message(spec, expected, actual)).expect(
|
||||||
htmlDiffer.isEqual(expected, actual)
|
htmlDiffer.isEqual(expected, actual)
|
||||||
).toEqual(!shouldFail);
|
).toEqual(!shouldFail);
|
||||||
|
@ -51,15 +51,13 @@
|
|||||||
"section": "Task list items",
|
"section": "Task list items",
|
||||||
"html": "<ul>\n<li><input disabled=\"\" type=\"checkbox\"> foo</li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> bar</li>\n</ul>",
|
"html": "<ul>\n<li><input disabled=\"\" type=\"checkbox\"> foo</li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> bar</li>\n</ul>",
|
||||||
"markdown": "- [ ] foo\n- [x] bar",
|
"markdown": "- [ ] foo\n- [x] bar",
|
||||||
"example": 272,
|
"example": 272
|
||||||
"xhtml": false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"section": "Task list items",
|
"section": "Task list items",
|
||||||
"html": "<ul>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> foo\n<ul>\n<li><input disabled=\"\" type=\"checkbox\"> bar</li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> baz</li>\n</ul>\n</li>\n<li><input disabled=\"\" type=\"checkbox\"> bim</li>\n</ul>",
|
"html": "<ul>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> foo\n<ul>\n<li><input disabled=\"\" type=\"checkbox\"> bar</li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> baz</li>\n</ul>\n</li>\n<li><input disabled=\"\" type=\"checkbox\"> bim</li>\n</ul>",
|
||||||
"markdown": "- [x] foo\n - [ ] bar\n - [x] baz\n- [ ] bim",
|
"markdown": "- [x] foo\n - [ ] bar\n - [x] baz\n- [ ] bim",
|
||||||
"example": 273,
|
"example": 273
|
||||||
"xhtml": false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"section": "Strikethrough",
|
"section": "Strikethrough",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user