# 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_lists is test
import test_markdown
class TestCommonmarkLists
super TestMarkdownHtml
test
fun test264 is test do
var md = """- foo\n- bar\n+ baz\n"""
var html = """
\n\n"""
assert md_to_html(md) == html
end
fun test265 is test do
var md = """1. foo\n2. bar\n3) baz\n"""
var html = """\n- foo
\n- bar
\n
\n\n- baz
\n
\n"""
assert md_to_html(md) == html
end
fun test266 is test do
var md = """Foo\n- bar\n- baz\n"""
var html = """Foo
\n\n"""
assert md_to_html(md) == html
end
fun test267 is test do
var md = """The number of windows in my house is\n14. The number of doors is 6.\n"""
var html = """The number of windows in my house is\n14. The number of doors is 6.
\n"""
assert md_to_html(md) == html
end
fun test268 is test do
var md = """The number of windows in my house is\n1. The number of doors is 6.\n"""
var html = """The number of windows in my house is
\n\n- The number of doors is 6.
\n
\n"""
assert md_to_html(md) == html
end
fun test269 is test do
var md = """- foo\n\n- bar\n\n\n- baz\n"""
var html = """\n- \n
foo
\n \n- \n
bar
\n \n- \n
baz
\n \n
\n"""
assert md_to_html(md) == html
end
fun test270 is test do
var md = """- foo\n - bar\n - baz\n\n\n bim\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test271 is test do
var md = """- foo\n- bar\n\n\n\n- baz\n- bim\n"""
var html = """\n\n\n"""
assert md_to_html(md) == html
end
fun test272 is test do
var md = """- foo\n\n notcode\n\n- foo\n\n\n\n code\n"""
var html = """\n- \n
foo
\nnotcode
\n \n- \n
foo
\n \n
\n\ncode\n
\n"""
assert md_to_html(md) == html
end
fun test273 is test do
var md = """- a\n - b\n - c\n - d\n - e\n - f\n- g\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test274 is test do
var md = """1. a\n\n 2. b\n\n 3. c\n"""
var html = """\n- \n
a
\n \n- \n
b
\n \n- \n
c
\n \n
\n"""
assert md_to_html(md) == html
end
fun test277 is test do
var md = """- a\n- b\n\n- c\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test278 is test do
var md = """* a\n*\n\n* c\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test279 is test do
var md = """- a\n- b\n\n c\n- d\n"""
var html = """\n- \n
a
\n \n- \n
b
\nc
\n \n- \n
d
\n \n
\n"""
assert md_to_html(md) == html
end
fun test280 is test do
var md = """- a\n- b\n\n [ref]: /url\n- d\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test281 is test do
var md = """- a\n- ```\n b\n\n\n ```\n- c\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test282 is test do
var md = """- a\n - b\n\n c\n- d\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test283 is test do
var md = """* a\n > b\n >\n* c\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test284 is test do
var md = """- a\n > b\n ```\n c\n ```\n- d\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test285 is test do
var md = """- a\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test286 is test do
var md = """- a\n - b\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test287 is test do
var md = """1. ```\n foo\n ```\n\n bar\n"""
var html = """\n- \n
foo\n
\nbar
\n \n
\n"""
assert md_to_html(md) == html
end
fun test288 is test do
var md = """* foo\n * bar\n\n baz\n"""
var html = """\n"""
assert md_to_html(md) == html
end
fun test289 is test do
var md = """- a\n - b\n - c\n\n- d\n - e\n - f\n"""
var html = """\n"""
assert md_to_html(md) == html
end
end