{ "regular_tests": [ { "name": "empty", "input": "", "expected_output": "", "text_content": "" }, { "name": "codeblock_hilite_python", "input": "Hamlet said:\n~~~~.python \ndef speak(self):\n x = 1\n~~~~", "expected_output": "
Hamlet said:
\ndef speak(self):\n x = 1\n
Hamlet said:
\ndef speak(self):\n x = 1\n
def speak(self):\n x = 1\n
def speak(self):\n x = 1\n
def speak(self):\n x = 1\n
& & &
\n& & &\n
& & &\n
test_input
", "text_content": "test_input" }, { "name": "codeblock_multiline", "input": "Hamlet once said\n~~~~\ndef func():\n x = 1\n\n y = 2\n\n z = 3\n~~~~\nAnd all was good.", "expected_output": "Hamlet once said
\ndef func():\n x = 1\n\n y = 2\n\n z = 3\n
And all was good.
", "text_content": "Hamlet once said\ndef func():\n x = 1\n\n y = 2\n\n z = 3\n\nAnd all was good." }, { "name": "normal_text_test", "input": "it's lunch time", "expected_output": "it's lunch time
" }, { "name": "codeblock_trailing_whitespace", "input": "Hamlet once said\n~~~~\ndef func():\n x = 1\n\n y = 2\t\t\n\n z = 3 \n~~~~\nAnd all was good.", "expected_output": "Hamlet once said
\ndef func():\n x = 1\n\n y = 2\n\n z = 3\n
And all was good.
", "text_content": "Hamlet once said\ndef func():\n x = 1\n\n y = 2\n\n z = 3\n\nAnd all was good." }, { "name": "inline_code_spaces", "input": "` outer ` ``` space ```", "expected_output": " outer
space
< >
fenced code\n
inline code
Hamlet said:
\ndef speak(self):\n x = 1\n# Comment to make this code block longer to test Trac #1162\n
Then he mentioned y = 4 + x**2
and
def foobar(self):\n return self.baz()\n
Hamlet said:
\n\n", "text_content": "Hamlet said:\n> To be or not to be.\n> That is the question\n" }, { "name": "fenced_nested_quote", "input": "Hamlet said:\n~~~ quote\nPolonius said:\n> This above all: to thine ownself be true,\nAnd it must follow, as the night the day,\nThou canst not then be false to any man.\n\nWhat good advice!\n~~~", "expected_output": "To be or not to be.
\nThat is the question
\n
Hamlet said:
\n\n", "text_content": "Hamlet said:\n> Polonius said:\n> > This above all: to thine ownself be true,\n> > And it must follow, as the night the day,\n> > Thou canst not then be false to any man.\n> What good advice!\n" }, { "name": "fenced_complexly_nested_quote", "input": "I heard about this second hand...\n~~~ quote\n\nHe said:\n~~~ quote\nThe customer is complaining.\n\nThey looked at this code:\n``` \ndef hello(): print 'hello\n```\nThey would prefer:\n~~~\ndef hello()\n puts 'hello'\nend\n~~~\n\nPlease advise.\n~~~\n\nShe said:\n~~~ quote\nJust send them this:\n```\necho \"hello\n\"\n```\n~~~", "expected_output": "Polonius said:
\n\n\nThis above all: to thine ownself be true,
\n
\nAnd it must follow, as the night the day,
\nThou canst not then be false to any man.What good advice!
\n
I heard about this second hand...
\n\n\nHe said:
\n\n\nThe customer is complaining.
\nThey looked at this code:
\n\ndef hello(): print 'hello\n
They would prefer:
\ndef hello()
\n
\n puts 'hello'
\nend
Please advise.
\nShe said:\n~~~ quote\nJust send them this:\n```\necho "hello\n"\n```\n
‘‘‘‘jsvarx;‘‘‘‘
" }, { "name": "empty_single_blockquote", "input": ">", "expected_output": ">
" }, { "name": "empty_multiple_blockquote", "input": ">>>>>", "expected_output": "\n" }, { "name": "non_empty_blockquote", "input": ">\n>\ntext", "expected_output": "\n\n\n\n\n\n>
\n
\n" }, { "name": "multiple_blockquote_with_angular_bracket", "input": "> Hello World!\n\n> Hello Universe!", "expected_output": "text
\n
\n\nHello World!
\n
\n" }, { "name": "multiple_blockquote_with_backticks_and_angular_bracket", "input": "```quote\nText in\nmultiple lines.\n```\n\n> Text in a single line.", "expected_output": "Hello Universe!
\n
\n\nText in
\n
\nmultiple lines.
\n" }, { "name": "multiple_blockquote_with_quote_and_reply", "input": "Hamlet said:\n~~~quote\nCan we talk ?\n~~~\n> Yes !!\n\nWelcome to Open Source.", "expected_output": "Text in a single line.
\n
Hamlet said:
\n\n\nCan we talk ?
\n
\n\nYes !!
\n
Welcome to Open Source.
", "text_content": "Hamlet said:\n> Can we talk ?\n\n> Yes !!\n\nWelcome to Open Source." }, { "name": "fenced_quote_with_hashtag", "input": "```quote\n# line 1\n#line 2\n```", "expected_output": "\n", "text_content": "> line 1\n> #line 2\n" }, { "name": "fenced_quote_and_list", "input": "Before:\n* One.\n* Two.\n\n```quote\nLists should work after a quote\n```\n\nAfter:\n* One.\n* Two.", "expected_output": "line 1
\n#line 2
\n
Before:
\n\n\nLists should work after a quote
\n
After:
\nxxxxxx xxxxx xxxxxxxx xxxx. x xxxx xxxxxxxxxx:
\n\"xxxx xxxx\\xxxxx\\xxxxxx\"
xxx xxxx xxxxx:xx.xxxxxxx(x'^xxxx$', xx.xxxxxxxxx)
xxxxxxx'x xxxx xxxxxxxxxx 'xxxx'
, xxxxx xxxxxxxxx xxxxx ^ xxx $ xxxxxx xxxxx xxxxxxxxxxxx xxx xxxx xx x xxxx xx xxxx xx xxx xxxxx xxxxxx?
one
two
x = 1\n
def foo(): pass\n
notcode
", "marked_expected_output": "notcode
", "text_content": "notcode" }, { "name": "hashheading_enabled", "input": "# Hello world", "expected_output": "#Hello world
" }, { "name": "hashheading_multiple_spaces", "input": "# Hello world", "expected_output": "####### Hello world
" }, { "name": "reference_links_disabled", "input": "Hello [world]\n\n[world]: https://google.com", "expected_output": "Hello [world]
\n[world]: https://google.com
" }, { "name": "reference_links_disabled_2", "input": "Hello [world][ref-name]\n\n[ref-name]: https://google.com", "expected_output": "Hello [world][ref-name]
\n[ref-name]: https://google.com
" }, { "name": "ulist_standard_1", "input": "Some text with a list:\n\n* One item\n* Two items\n* Three items", "expected_output": "Some text with a list:
\nSome text with a list:
\nSome text with a list:
\nThis is a heavily nested OL
\npara:
\n1. list-1\n2. list-2\n 1. list-2a\n3. list-3\n
Combine four lists:
\nCombine four lists:
\nSome text with a hanging list:
\nTwo
\nTwo continued
\nThis shouldn't be a code block
One
\nTwo
\nTwo continued
\nThis shouldn't be a code block
Plain list
\nAlpha
\nBeta
\nThen hang it off:
\nPlain list
\nAlpha
\nBeta
\nThen hang it off:
\nPlain list
\nAnd again:
\nOnce more for feeling:
\n\n", "text_content": "> Some text with a hanging list inside quote:\n> one\n> two\n> three\n" }, { "name": "ulist_nested_ulist_two_space_indent", "input": "Nested list\n* I am outer list\n * I am inner nested list first item\n * I am inner nested list second item", "expected_output": "Some text with a hanging list inside quote:
\n\n
\n- one
\n- two
\n- three
\n
Nested list
\nint x = 3\n* 4;\n
~~~~~~~~xxxxxxxxx: xxxxxxxxxxxx xxxxx x xxxxxxxx~~~~~~
", "text_content": "~~~~~~~~xxxxxxxxx: xxxxxxxxxxxx xxxxx x xxxxxxxx~~~~~~" }, { "name": "strikthrough_basic", "input": "I like ~~software~~ hardware", "expected_output": "I like software hardware
I like software love hardware
I like software love hardware
test http://xx.xx link
_foo_
" }, { "name": "emphasis_text", "input": "*foo*", "expected_output": "foo
", "text_content": "foo" }, { "name": "emphasis_code", "input": "const char *x = (char *)y", "expected_output": "const char *x = (char *)y
" }, { "name": "emphasis_with_space", "input": "A *foo bar* is a *baz quux*", "expected_output": "A foo bar is a baz quux
", "text_content": "A foo bar is a baz quux" }, { "name": "emphasis_with_html", "input": "*<h1>Hello world</h1>
" }, { "name": "underscore_strong_disabled", "input": "__foo__", "expected_output": "__foo__
" }, { "name": "star_strong", "input": "**foo**", "expected_output": "foo
", "text_content": "foo" }, { "name": "star_emoji", "input": "**:smile:**", "expected_output": ":smile:
", "text_content": "\ud83d\ude42" }, { "name": "star_strong_em", "input": "***foo***", "expected_output": "foo
", "text_content": "foo" }, { "name": "strong_with_html", "input": "**<h1>Hello world</h1>
" }, { "name": "numbered_list", "input": "1. A\n2. B\n 3. C", "expected_output": "link: xx, x xxxxx xx xxxx xx
\nxxxxx #xx:xxxxxxx
\nxxxxxxx xxxxx xxxx xxxxx:
\nxxxxxx
: xxxxxxx
\nxxxxxx
: xxxxx
\nxxxxxx
: xxxxx xxxxx
Google logo today: https://www.google.com/images/srpr/logo4w.png
\nKinda boring
\n", "backend_only_rendering": true, "text_content": "> Google logo today:\n> https:\/\/www.google.com\/images\/srpr\/logo4w.png\n> Kinda boring\n" }, { "name": "two_inline_images", "input": "Google logo today: https://www.google.com/images/srpr/logo4w.png\nKinda boring\nZulip logo: https://zulip.com/static/images/logo/zulip-icon-128x128.png", "expected_output": "Google logo today:
\n
\nhttps://www.google.com/images/srpr/logo4w.png
\nKinda boring
Google logo today: https:\/\/www.google.com\/images\/srpr\/logo4w.png<\/a>
\nKinda boring
\nZulip logo: https:\/\/zulip.com\/static\/images\/logo\/zulip-icon-128x128.png<\/a><\/p>\n