# 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_thematic_breaks is test import test_markdown class TestCommonmarkThematicBreaks super TestMarkdownHtml test fun test13 is test do var md = """***\n---\n___\n""" var html = """
+++
\n""" assert md_to_html(md) == html end fun test15 is test do var md = """===\n""" var html = """===
\n""" assert md_to_html(md) == html end fun test16 is test do var md = """--\n**\n__\n""" var html = """--\n**\n__
\n""" assert md_to_html(md) == html end fun test17 is test do var md = """ ***\n ***\n ***\n""" var html = """***\n
\n"""
assert md_to_html(md) == html
end
fun test19 is test do
var md = """Foo\n ***\n"""
var html = """Foo\n***
\n""" assert md_to_html(md) == html end fun test20 is test do var md = """_____________________________________\n""" var html = """_ _ _ _ a
\na------
\n---a---
\n""" assert md_to_html(md) == html end fun test26 is test do var md = """ *-*\n""" var html = """-
\n""" assert md_to_html(md) == html end fun test27 is test do var md = """- foo\n***\n- bar\n""" var html = """Foo
\nbar
\n""" assert md_to_html(md) == html end fun test29 is test do var md = """Foo\n---\nbar\n""" var html = """bar
\n""" assert md_to_html(md) == html end fun test30 is test do var md = """* Foo\n* * *\n* Bar\n""" var html = """