Browse Source

Merge 17a4493e96 into ff643c5bf5

pull/293/merge
Brian Armstrong 8 years ago
committed by GitHub
parent
commit
7580039fae
  1. 4
      lib/rules_block/list.js
  2. 38
      test/fixtures/commonmark/good.txt
  3. 2
      test/fixtures/markdown-it/commonmark_extras.txt

4
lib/rules_block/list.js

@ -179,9 +179,7 @@ module.exports = function list(state, startLine, endLine, silent) {
if (isOrdered) { if (isOrdered) {
token = state.push('ordered_list_open', 'ol', 1); token = state.push('ordered_list_open', 'ol', 1);
if (markerValue !== 1) { token.attrs = [ [ 'start', markerValue ] ];
token.attrs = [ [ 'start', markerValue ] ];
}
} else { } else {
token = state.push('bullet_list_open', 'ul', 1); token = state.push('bullet_list_open', 'ul', 1);

38
test/fixtures/commonmark/good.txt

@ -964,7 +964,7 @@ src line: 1417
- bar - bar
. .
<ol> <ol start="1">
<li> <li>
<p>foo</p> <p>foo</p>
<ul> <ul>
@ -2900,7 +2900,7 @@ src line: 3669
> A block quote. > A block quote.
. .
<ol> <ol start="1">
<li> <li>
<p>A paragraph <p>A paragraph
with two lines.</p> with two lines.</p>
@ -2984,7 +2984,7 @@ src line: 3763
. .
<blockquote> <blockquote>
<blockquote> <blockquote>
<ol> <ol start="1">
<li> <li>
<p>one</p> <p>one</p>
<p>two</p> <p>two</p>
@ -3055,7 +3055,7 @@ src line: 3839
> bam > bam
. .
<ol> <ol start="1">
<li> <li>
<p>foo</p> <p>foo</p>
<pre><code>bar <pre><code>bar
@ -3203,7 +3203,7 @@ src line: 4002
more code more code
. .
<ol> <ol start="1">
<li> <li>
<pre><code>indented code <pre><code>indented code
</code></pre> </code></pre>
@ -3224,7 +3224,7 @@ src line: 4024
more code more code
. .
<ol> <ol start="1">
<li> <li>
<pre><code> indented code <pre><code> indented code
</code></pre> </code></pre>
@ -3367,7 +3367,7 @@ src line: 4190
2. 2.
3. bar 3. bar
. .
<ol> <ol start="1">
<li>foo</li> <li>foo</li>
<li></li> <li></li>
<li>bar</li> <li>bar</li>
@ -3412,7 +3412,7 @@ src line: 4237
> A block quote. > A block quote.
. .
<ol> <ol start="1">
<li> <li>
<p>A paragraph <p>A paragraph
with two lines.</p> with two lines.</p>
@ -3436,7 +3436,7 @@ src line: 4261
> A block quote. > A block quote.
. .
<ol> <ol start="1">
<li> <li>
<p>A paragraph <p>A paragraph
with two lines.</p> with two lines.</p>
@ -3460,7 +3460,7 @@ src line: 4285
> A block quote. > A block quote.
. .
<ol> <ol start="1">
<li> <li>
<p>A paragraph <p>A paragraph
with two lines.</p> with two lines.</p>
@ -3504,7 +3504,7 @@ with two lines.
> A block quote. > A block quote.
. .
<ol> <ol start="1">
<li> <li>
<p>A paragraph <p>A paragraph
with two lines.</p> with two lines.</p>
@ -3524,7 +3524,7 @@ src line: 4363
1. A paragraph 1. A paragraph
with two lines. with two lines.
. .
<ol> <ol start="1">
<li>A paragraph <li>A paragraph
with two lines.</li> with two lines.</li>
</ol> </ol>
@ -3538,7 +3538,7 @@ src line: 4376
continued here. continued here.
. .
<blockquote> <blockquote>
<ol> <ol start="1">
<li> <li>
<blockquote> <blockquote>
<p>Blockquote <p>Blockquote
@ -3557,7 +3557,7 @@ src line: 4393
> continued here. > continued here.
. .
<blockquote> <blockquote>
<ol> <ol start="1">
<li> <li>
<blockquote> <blockquote>
<p>Blockquote <p>Blockquote
@ -3663,7 +3663,7 @@ src line: 4507
. .
1. - 2. foo 1. - 2. foo
. .
<ol> <ol start="1">
<li> <li>
<ul> <ul>
<li> <li>
@ -3720,7 +3720,7 @@ src line: 4777
2. bar 2. bar
3) baz 3) baz
. .
<ol> <ol start="1">
<li>foo</li> <li>foo</li>
<li>bar</li> <li>bar</li>
</ol> </ol>
@ -3763,7 +3763,7 @@ The number of windows in my house is
1. The number of doors is 6. 1. The number of doors is 6.
. .
<p>The number of windows in my house is</p> <p>The number of windows in my house is</p>
<ol> <ol start="1">
<li>The number of doors is 6.</li> <li>The number of doors is 6.</li>
</ol> </ol>
. .
@ -3907,7 +3907,7 @@ src line: 5025
3. c 3. c
. .
<ol> <ol start="1">
<li> <li>
<p>a</p> <p>a</p>
</li> </li>
@ -4135,7 +4135,7 @@ src line: 5257
bar bar
. .
<ol> <ol start="1">
<li> <li>
<pre><code>foo <pre><code>foo
</code></pre> </code></pre>

2
test/fixtures/markdown-it/commonmark_extras.txt

@ -449,7 +449,7 @@ Coverage. Tabs in lists.
bar bar
. .
<ol> <ol start="1">
<li> <li>
<p>foo</p> <p>foo</p>
<pre><code> bar <pre><code> bar

Loading…
Cancel
Save