# 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_html_blocks is test import test_markdown class TestCommonmarkHTMLBlocks super TestMarkdownHtml test fun test116 is test do var md = """
\n\n**Hello**,\n\n_world_.\n\n |
\n\n**Hello**,\n\n |
\n hi\n | \n
\n hi\n | \n
okay.
\n""" assert md_to_html(md) == html end fun test118 is test do var md = """Markdown
\nbar
\n""" assert md_to_html(md) == html end fun test124 is test do var md = """\n""" var html = """\n""" assert md_to_html(md) == html end fun test128 is test do var md = """\nfoo\n |
\nfoo\n |
foo
\nfoo
\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
\nokay\n"""
var html = """\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
\nokay
\n""" assert md_to_html(md) == html end fun test138 is test do var md = """\nokay\n""" var html = """\nokay
\n""" assert md_to_html(md) == html end fun test139 is test do var md = """\nokay\n""" var html = """\nokay
\n""" assert md_to_html(md) == html end fun test140 is test do var md = """\n*foo*\n""" var html = """\nfoo
\n""" assert md_to_html(md) == html end fun test144 is test do var md = """*bar*\n*baz*\n""" var html = """*bar*\nbaz
\n""" assert md_to_html(md) == html end fun test145 is test do var md = """1. *bar*\n""" var html = """1. *bar*\n""" assert md_to_html(md) == html end fun test146 is test do var md = """\nokay\n""" var html = """\nokay
\n""" assert md_to_html(md) == html end fun test147 is test do var md = """';\n\n?>\nokay\n""" var html = """';\n\n?>\nokay
\n""" assert md_to_html(md) == html end fun test148 is test do var md = """\n""" var html = """\n""" assert md_to_html(md) == html end fun test149 is test do var md = """\nokay\n""" var html = """\nokay
\n""" assert md_to_html(md) == html end fun test150 is test do var md = """ \n\n \n""" var html = """ \n<!-- foo -->\n
\n"""
assert md_to_html(md) == html
end
fun test151 is test do
var md = """ <div>\n
\n"""
assert md_to_html(md) == html
end
fun test152 is test do
var md = """Foo\nFoo
\nFoo\n\nbaz
\n""" assert md_to_html(md) == html end fun test155 is test do var md = """Emphasized text.
\n\nHi\n | \n\n
\nHi\n | \n
\n Hi\n | \n\n