1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Tests related to markdown issues from the Git repo
19 # * 1525: lib/markdown: issue with nested fences
20 # * 2507: markdown: some lines are lost in verbatim blocks inside a list
22 # See <https://github.com/nitlang/nit/issues>.
23 module test_markdown_issues
is test
27 class TestMarkdownIssues
28 super TestMarkdownHtml
31 # See <https://github.com/nitlang/nit/issues/1525>.
32 fun test_issue_1525_1
is test
do
34 A fence within a fence
43 <p>A fence within a fence</p>
50 assert md_to_html
(md
) == html
53 # See <https://github.com/nitlang/nit/issues/1525>.
54 fun test_issue_1525_2
is test
do
56 A fence within a fence
65 <p>A fence within a fence</p>
72 assert md_to_html
(md
) == html
75 # See <https://github.com/nitlang/nit/issues/1525>.
76 fun test_issue_1525_3
is test
do
78 A fence within a fence
87 <p>A fence within a fence</p>
94 assert md_to_html
(md
) == html
97 # See <https://github.com/nitlang/nit/issues/2507>.
98 fun test_issue_2507_1
is test
do
100 * 4 spaces, `asdf` and `tab.` are lost
112 <li>4 spaces, <code>asdf</code> and <code>tab.</code> are lost
123 assert md_to_html
(md
) == html
126 # See <https://github.com/nitlang/nit/issues/2507>.
127 fun test_issue_2507_2
is test
do
129 * 2 spaces, `as` is lost
141 <p>2 spaces, <code>as</code> is lost</p>
150 assert md_to_html
(md
) == html