Skip to content

Commit

Permalink
Fix using tabs for list items. Fixes #108
Browse files Browse the repository at this point in the history
  • Loading branch information
Knagis committed Jan 29, 2017
1 parent 6cd0951 commit 103a06a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CommonMark.Tests/ListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public void ListWithTabs()
Helpers.ExecuteTest("*\tbar", "<ul>\n<li>bar</li>\n</ul>");
}

[TestMethod]
[TestCategory("Container blocks - List items")]
public void ListWithTabs2()
{
Helpers.ExecuteTest("* foo\n\t* i1\n\t* i2", "<ul>\n<li>foo\n<ul>\n<li>i1</li>\n<li>i2</li>\n</ul>\n</li>\n</ul>");
}

[TestMethod]
[TestCategory("Container blocks - List items")]
public void UnicodeBulletEscape()
Expand Down
2 changes: 1 addition & 1 deletion CommonMark/Parser/BlockMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ public static void IncorporateLine(LineInfo line, ref Block curptr)

FindFirstNonspace(ln, offset, column, out first_nonspace, out first_nonspace_column, out curChar);

indent = first_nonspace_column - column;
indent = first_nonspace_column - column + remainingSpaces;
blank = curChar == '\n';

var indented = indent >= CODE_INDENT;
Expand Down

0 comments on commit 103a06a

Please sign in to comment.