# This file is part of NIT ( http://www.nitlanguage.org ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module test_commonmark_list_items is test import test_markdown class TestCommonmarkListItems super TestMarkdownHtml test fun test216 is test do var md = """A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n""" var html = """
A paragraph\nwith two lines.
\nindented code\n
\n\n\n""" assert md_to_html(md) == html end fun test217 is test do var md = """1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n""" var html = """A block quote.
\n
A paragraph\nwith two lines.
\nindented code\n
\n\n\nA block quote.
\n
two
\n""" assert md_to_html(md) == html end fun test219 is test do var md = """- one\n\n two\n""" var html = """one
\ntwo
\n two\n
\n"""
assert md_to_html(md) == html
end
fun test221 is test do
var md = """ - one\n\n two\n"""
var html = """one
\ntwo
\n\n\n""" assert md_to_html(md) == html end fun test223 is test do var md = """>>- one\n>>\n > > two\n""" var html = """\n\n\n
\n- \n
\none
\ntwo
\n
\n\n""" assert md_to_html(md) == html end fun test224 is test do var md = """-one\n\n2.two\n""" var html = """\n\n\n
\n- one
\ntwo
\n
-one
\n2.two
\n""" assert md_to_html(md) == html end fun test225 is test do var md = """- foo\n\n\n bar\n""" var html = """foo
\nbar
\nfoo
\nbar\n
\nbaz
\n\n\nbam
\n
Foo
\nbar\n\n\nbaz\n
\n1234567890. not ok
\n""" assert md_to_html(md) == html end fun test230 is test do var md = """0. ok\n""" var html = """-1. not ok
\n""" assert md_to_html(md) == html end fun test233 is test do var md = """- foo\n\n bar\n""" var html = """foo
\nbar\n
\nfoo
\nbar\n
\nindented code\n
\nparagraph
\nmore code\n
\n"""
assert md_to_html(md) == html
end
fun test236 is test do
var md = """1. indented code\n\n paragraph\n\n more code\n"""
var html = """indented code\n
\nparagraph
\nmore code\n
\n indented code\n
\nparagraph
\nmore code\n
\nfoo
\nbar
\n""" assert md_to_html(md) == html end fun test239 is test do var md = """- foo\n\n bar\n""" var html = """bar
\n""" assert md_to_html(md) == html end fun test240 is test do var md = """- foo\n\n bar\n""" var html = """foo
\nbar
\nbar\n
\nbaz\n
\nfoo
\n""" assert md_to_html(md) == html end fun test244 is test do var md = """- foo\n-\n- bar\n""" var html = """foo\n*
\nfoo\n1.
\n""" assert md_to_html(md) == html end fun test249 is test do var md = """ 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n""" var html = """A paragraph\nwith two lines.
\nindented code\n
\n\n\nA block quote.
\n
A paragraph\nwith two lines.
\nindented code\n
\n\n\nA block quote.
\n
A paragraph\nwith two lines.
\nindented code\n
\n\n\nA block quote.
\n
1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n
\n"""
assert md_to_html(md) == html
end
fun test253 is test do
var md = """ 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n"""
var html = """A paragraph\nwith two lines.
\nindented code\n
\n\n\nA block quote.
\n
\n\n""" assert md_to_html(md) == html end fun test256 is test do var md = """> 1. > Blockquote\n> continued here.\n""" var html = """\n
\n- \n
\n\n\nBlockquote\ncontinued here.
\n
\n\n""" assert md_to_html(md) == html end fun test257 is test do var md = """- foo\n - bar\n - baz\n - boo\n""" var html = """\n
\n- \n
\n\n\nBlockquote\ncontinued here.
\n