Skip to content

Commit

Permalink
fix(markdown): indented lists (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukakerr authored and marcoscaceres committed Mar 12, 2019
1 parent 2ed47cf commit cd73c87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/languages/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function(hljs) {
// lists (indicators only)
{
className: 'bullet',
begin: '^([*+-]|(\\d+\\.))\\s+'
begin: '^\\s*([*+-]|(\\d+\\.))\\s+'
},
// strong segments
{
Expand Down
5 changes: 5 additions & 0 deletions test/markup/markdown/list.expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<span class="hljs-bullet">- </span>this is a list
<span class="hljs-bullet">- </span>this is another
<span class="hljs-bullet"> - </span>nested list
<span class="hljs-bullet"> - </span>another nested
<span class="hljs-bullet"> * </span>nested alternative
5 changes: 5 additions & 0 deletions test/markup/markdown/list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- this is a list
- this is another
- nested list
- another nested
* nested alternative

0 comments on commit cd73c87

Please sign in to comment.