mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-08 13:54:54 +00:00
Fix regression for html block parsing (issue #21)
This commit is contained in:
@@ -51,6 +51,23 @@ Later in a text we are using HTML and it becomes an abbr tag HTML
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void TestHtmlBug()
|
||||
{
|
||||
TestParser.TestSpec(@" # header1
|
||||
|
||||
<pre class='copy'>
|
||||
blabla
|
||||
</pre>
|
||||
|
||||
# header2
|
||||
", @"<h1>header1</h1>
|
||||
<pre class='copy'>
|
||||
blabla
|
||||
</pre>
|
||||
<h1>header2</h1>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace Markdig.Helpers
|
||||
endOfIndex = 0;
|
||||
for (int i = Start; i <= end; i++)
|
||||
{
|
||||
if (MatchLowercase(text, End, i))
|
||||
if (MatchLowercase(text, End, i - Start))
|
||||
{
|
||||
endOfIndex = i + text.Length;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user