mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-10 05:49:27 +00:00
Fix indenting issue after a double digit list block using a tab (#134)
This commit is contained in:
@@ -12,6 +12,18 @@ namespace Markdig.Tests
|
||||
[TestFixture]
|
||||
public class TestPlayParser
|
||||
{
|
||||
[Test]
|
||||
public void TestListBug2()
|
||||
{
|
||||
TestParser.TestSpec("10.\t*test* – test\n\n11.\t__test__ test\n\n", @"<ol start=""10"">
|
||||
<li><p><em>test</em> – test</p>
|
||||
</li>
|
||||
<li><p><strong>test</strong> test</p>
|
||||
</li>
|
||||
</ol>
|
||||
");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSimple()
|
||||
{
|
||||
|
||||
@@ -230,17 +230,16 @@ namespace Markdig.Parsers
|
||||
return BlockState.None;
|
||||
}
|
||||
|
||||
// We require at least one char
|
||||
state.NextColumn();
|
||||
|
||||
// Parse the following indent
|
||||
state.RestartIndent();
|
||||
var columnBeforeIndent = state.Column;
|
||||
state.ParseIndent();
|
||||
|
||||
if (state.IsCodeIndent)
|
||||
// We expect at most 4 columns after
|
||||
// If we have more, we reset the position
|
||||
if (state.Indent > 4)
|
||||
{
|
||||
state.GoToColumn(columnBeforeIndent);
|
||||
state.GoToColumn(columnBeforeIndent + 1);
|
||||
}
|
||||
|
||||
// Number of spaces required for the following content to be part of this list item
|
||||
|
||||
Reference in New Issue
Block a user