markdown.js: Move markdown.js test to bugdown-data.json.

This commit is contained in:
Joshua Pan 2017-07-18 11:24:18 -07:00 committed by Tim Abbott
parent ed381763f0
commit 09043c25ca
2 changed files with 6 additions and 2 deletions

View File

@ -240,8 +240,6 @@ var bugdown_data = JSON.parse(fs.readFileSync(path.join(__dirname, '../../zerver
expected: '<p>T<br>\n<span class="user-mention" data-user-id="101">@Cordelia Lear</span></p>'},
{input: 'This is a realm filter `hello` with text after it',
expected: '<p>This is a realm filter <code>hello</code> with text after it</p>'},
{input: '```quote\n# line 1\n# line 2\n```',
expected: '<blockquote>\n<p># line 1<br>\n# line 2</p>\n</blockquote>'},
];
// We remove one of the unicode emoji we put as input in one of the test

View File

@ -54,6 +54,12 @@
"expected_output": "<p>I heard about this second hand...</p>\n<blockquote>\n<p>He said:</p>\n<blockquote>\n<p>The customer is complaining.</p>\n<p>They looked at this code:</p>\n<div class=\"codehilite\"><pre><span></span>def hello(): print &#39;hello\n</pre></div>\n\n\n<p>They would prefer:</p>\n</blockquote>\n<p>def hello()<br>\n puts 'hello'<br>\nend</p>\n</blockquote>\n<p>Please advise.</p>\n<div class=\"codehilite\"><pre><span></span>She said:\n~~~ quote\nJust send them this:\n```\necho &quot;hello\n&quot;\n```\n</pre></div>",
"bugdown_matches_marked": false
},
{
"name": "fenced_quote_with_hashtag",
"input": "```quote\n# line 1\n# line 2\n```",
"expected_output": "<blockquote>\n<p># line 1<br>\n# line 2</p>\n</blockquote>",
"bugdown_matches_marked": true
},
{
"name": "dangerous_block",
"input": "xxxxxx xxxxx xxxxxxxx xxxx. x xxxx xxxxxxxxxx:\n\n```\"xxxx xxxx\\xxxxx\\xxxxxx\"```\n\nxxx xxxx xxxxx:```xx.xxxxxxx(x'^xxxx$', xx.xxxxxxxxx)```\n\nxxxxxxx'x xxxx xxxxxxxxxx ```'xxxx'```, xxxxx xxxxxxxxx xxxxx ^ xxx $ xxxxxx xxxxx xxxxxxxxxxxx xxx xxxx xx x xxxx xx xxxx xx xxx xxxxx xxxxxx?",