mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(suparsbers/lists.js): fix odd behavior for multiple consecutive lists
This commit is contained in:
parent
a3b412c502
commit
11f32e04a6
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
19
test/cases/nested-lists.html
Normal file
19
test/cases/nested-lists.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<ul>
|
||||
<li>foo</li>
|
||||
<li>bar
|
||||
<ul><li>baz
|
||||
<ul><li>bazinga</li></ul></li>
|
||||
<li>nhecos</li></ul></li>
|
||||
<li>bada</li>
|
||||
</ul>
|
||||
|
||||
<p>separator</p>
|
||||
|
||||
<ul>
|
||||
<li>foo</li>
|
||||
<li>bar
|
||||
<ol><li>baz
|
||||
<ul><li>bazinga</li></ul></li>
|
||||
<li>nhecos</li></ol></li>
|
||||
<li>bada</li>
|
||||
</ul>
|
17
test/cases/nested-lists.md
Normal file
17
test/cases/nested-lists.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
- foo
|
||||
- bar
|
||||
- baz
|
||||
- bazinga
|
||||
- nhecos
|
||||
- bada
|
||||
|
||||
separator
|
||||
|
||||
- foo
|
||||
- bar
|
||||
1. baz
|
||||
+ bazinga
|
||||
2. nhecos
|
||||
- bada
|
||||
|
||||
|
8
test/extra/break-two-lists.html
Normal file
8
test/extra/break-two-lists.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<ul>
|
||||
<li>foo</li>
|
||||
<li>bar</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>baz</li>
|
||||
<li>bazinga</li>
|
||||
</ul>
|
6
test/extra/break-two-lists.md
Normal file
6
test/extra/break-two-lists.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
- foo
|
||||
- bar
|
||||
|
||||
|
||||
- baz
|
||||
- bazinga
|
|
@ -0,0 +1,8 @@
|
|||
<ul>
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
</ul>
|
||||
<ol>
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
</ol>
|
|
@ -0,0 +1,5 @@
|
|||
* Item 1
|
||||
* Item 2
|
||||
|
||||
1. Item 1
|
||||
2. Item 2
|
|
@ -15,19 +15,26 @@
|
|||
.map(map('test/cases/')),
|
||||
issues = fs.readdirSync('test/issues/')
|
||||
.filter(filter())
|
||||
.map(map('test/issues/'));
|
||||
.map(map('test/issues/')),
|
||||
extra = fs.readdirSync('test/extra/')
|
||||
.filter(filter())
|
||||
.map(map('test/extra/'));
|
||||
|
||||
//Tests
|
||||
describe('Converter.makeHtml() simple testcases', function () {
|
||||
var converter = new showdown.Converter();
|
||||
for (var i = 0; i < cases.length; ++i) {
|
||||
if (cases[i].name === 'github-style-at-start') {
|
||||
console.log(showdown.getOptions());
|
||||
}
|
||||
it(cases[i].name, assertion(cases[i], converter));
|
||||
}
|
||||
});
|
||||
|
||||
describe('Converter.makeHtml() EXTRA testcases', function () {
|
||||
var converter = new showdown.Converter();
|
||||
for (var i = 0; i < extra.length; ++i) {
|
||||
it(extra[i].name, assertion(extra[i], converter));
|
||||
}
|
||||
});
|
||||
|
||||
describe('Converter.makeHtml() issues testcase', function () {
|
||||
var converter = new showdown.Converter();
|
||||
for (var i = 0; i < issues.length; ++i) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user