mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
Update tests
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Headings
|
||||
@@ -79,15 +78,15 @@ namespace Markdig.Tests.Specs.Normalize.Headings
|
||||
// Heading
|
||||
// =======
|
||||
//
|
||||
// Text after two newlines
|
||||
// Text after two newlines 1
|
||||
//
|
||||
// Should be rendered as:
|
||||
// # Heading
|
||||
//
|
||||
// Text after two newlines
|
||||
// Text after two newlines 1
|
||||
|
||||
Console.WriteLine("Example 3\nSection Headings\n");
|
||||
TestNormalize.TestSpec("Heading\n=======\n\nText after two newlines", "# Heading\n\nText after two newlines", "");
|
||||
TestNormalize.TestSpec("Heading\n=======\n\nText after two newlines 1", "# Heading\n\nText after two newlines 1", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ Text after two newlines
|
||||
Heading
|
||||
=======
|
||||
|
||||
Text after two newlines
|
||||
Text after two newlines 1
|
||||
.
|
||||
# Heading
|
||||
|
||||
Text after two newlines
|
||||
Text after two newlines 1
|
||||
````````````````````````````````
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Sample
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-05-15 02:46:55
|
||||
|
||||
// --------------------------------
|
||||
// Abbreviations
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Auto Identifiers
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-09-30 08:12:16
|
||||
|
||||
// --------------------------------
|
||||
// Auto Links
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-15 05:23:49
|
||||
|
||||
// --------------------------------
|
||||
// Bootstrap
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-08-28 11:05:04
|
||||
|
||||
// --------------------------------
|
||||
// CommonMark v. 0.29
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Custom Containers
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-15 05:06:35
|
||||
|
||||
// --------------------------------
|
||||
// Definition Lists
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Diagrams
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-01-13 21:08:58
|
||||
|
||||
// --------------------------------
|
||||
// Emoji
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Emphasis Extra
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Figures, Footers and Cites
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-15 05:33:49
|
||||
|
||||
// --------------------------------
|
||||
// Footnotes
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-08-01 13:57:17
|
||||
|
||||
// --------------------------------
|
||||
// Generic Attributes
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-15 05:25:26
|
||||
|
||||
// --------------------------------
|
||||
// Globalization
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-04-20 07:21:20
|
||||
|
||||
// --------------------------------
|
||||
// Grid Tables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Hardline Breaks
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-15 05:30:00
|
||||
|
||||
// --------------------------------
|
||||
// Jira Links
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// List Extras
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Math
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-05-12 19:59:34
|
||||
|
||||
// --------------------------------
|
||||
// Media
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// No Html
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-07-30 15:47:38
|
||||
|
||||
// --------------------------------
|
||||
// GFM Pipe Tables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2020-07-30 15:32:13
|
||||
|
||||
// --------------------------------
|
||||
// Pipe Tables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-08-01 12:33:23
|
||||
|
||||
// --------------------------------
|
||||
// Smarty Pants
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Task Lists
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Generated: 2019-04-05 16:06:14
|
||||
|
||||
// --------------------------------
|
||||
// Yaml
|
||||
|
||||
@@ -110,20 +110,12 @@ namespace SpecFileGen
|
||||
if (File.Exists(spec.OutputPath)) // If the source hasn't changed, don't bump the generated tag
|
||||
{
|
||||
string previousSource = File.ReadAllText(spec.OutputPath).Replace("\r\n", "\n", StringComparison.Ordinal);
|
||||
int start = previousSource.IndexOf('\n', StringComparison.Ordinal) + 1;
|
||||
int previousLength = previousSource.Length - start;
|
||||
if (start != 0 && previousLength == source.Length)
|
||||
if (previousSource == source)
|
||||
{
|
||||
if (previousSource.IndexOf(source, start, previousLength, StringComparison.Ordinal) == start)
|
||||
{
|
||||
// The source did not change
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
string generated = "// Generated: " + DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss") + '\n';
|
||||
File.WriteAllText(spec.OutputPath, generated + source);
|
||||
File.WriteAllText(spec.OutputPath, source);
|
||||
anyChanged = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user