From ae726b3796cfb1804e4decf54582172d7b80524e Mon Sep 17 00:00:00 2001 From: SebastianRaffel <63394251+SebastianRaffel@users.noreply.github.com> Date: Tue, 14 Apr 2020 08:51:44 +0200 Subject: [PATCH 1/2] Fix duplicate Rule numbering + bold headlines --- src/Markdig.Tests/Specs/PipeTableSpecs.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Markdig.Tests/Specs/PipeTableSpecs.md b/src/Markdig.Tests/Specs/PipeTableSpecs.md index bdb9b84b..a0dcef8f 100644 --- a/src/Markdig.Tests/Specs/PipeTableSpecs.md +++ b/src/Markdig.Tests/Specs/PipeTableSpecs.md @@ -463,7 +463,7 @@ a | b `

a | b 0 |

```````````````````````````````` -**Rule #7** +**Rule #8** A HTML inline has a higher precedence than a column delimiter `|`: @@ -488,7 +488,7 @@ a | b ```````````````````````````````` -**Rule #8** +**Rule #9** Links have a higher precedence than the column delimiter character `|`: @@ -513,7 +513,7 @@ a | b ```````````````````````````````` -** Rule #9** +**Rule #10** It is possible to have a single row header only: @@ -546,7 +546,7 @@ a | b ```````````````````````````````` -** Tests ** +**Tests** Tests trailing spaces after pipes @@ -586,7 +586,7 @@ Tests trailing spaces after pipes ```````````````````````````````` -** Normalized columns count ** +**Normalized columns count** The tables are normalized to the maximum number of columns found in a table @@ -612,4 +612,4 @@ a | b -```````````````````````````````` \ No newline at end of file +```````````````````````````````` From c64cd53ac32a944046051ddac338f43b588e91d9 Mon Sep 17 00:00:00 2001 From: Sebastian Raffel Date: Mon, 20 Apr 2020 09:23:13 +0200 Subject: [PATCH 2/2] Exec SpecFileGen --- .../Specs/GridTableSpecs.generated.cs | 60 +++++++++---------- .../Specs/PipeTableSpecs.generated.cs | 12 ++-- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Markdig.Tests/Specs/GridTableSpecs.generated.cs b/src/Markdig.Tests/Specs/GridTableSpecs.generated.cs index 9d49e43e..3e7fbb74 100644 --- a/src/Markdig.Tests/Specs/GridTableSpecs.generated.cs +++ b/src/Markdig.Tests/Specs/GridTableSpecs.generated.cs @@ -1,4 +1,4 @@ -// Generated: 2019-04-05 16:06:14 +// Generated: 2020-04-20 07:21:20 // -------------------------------- // Grid Tables @@ -62,8 +62,8 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // + // + // // // // @@ -73,7 +73,7 @@ namespace Markdig.Tests.Specs.GridTables //
This is
Console.WriteLine("Example 1\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+---------+---------+\n| This is | a table |", "\n\n\n\n\n\n\n\n\n
This isa table
", "gridtables|advanced"); + TestParser.TestSpec("+---------+---------+\n| This is | a table |", "\n\n\n\n\n\n\n\n\n
This isa table
", "gridtables|advanced"); } // The following is not a valid row separator @@ -112,9 +112,9 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // - // + // + // + // // // //
Col1 @@ -135,7 +135,7 @@ namespace Markdig.Tests.Specs.GridTables //
Console.WriteLine("Example 3\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+---------+---------+---------+\n| Col1 | Col2 | Col3 |\n| Col1a | Col2a | Col3a |\n| Col1b | Col3b |\n| Col1c |", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Col1\nCol1aCol2\nCol2aCol3\nCol3a
Col1bCol3b
Col1c
", "gridtables|advanced"); + TestParser.TestSpec("+---------+---------+---------+\n| Col1 | Col2 | Col3 |\n| Col1a | Col2a | Col3a |\n| Col1b | Col3b |\n| Col1c |", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Col1\nCol1aCol2\nCol2aCol3\nCol3a
Col1bCol3b
Col1c
", "gridtables|advanced"); } // A row header is separated using `+========+` instead of `+---------+`: @@ -152,8 +152,8 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // + // + // // // // @@ -163,7 +163,7 @@ namespace Markdig.Tests.Specs.GridTables //
This is
Console.WriteLine("Example 4\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+---------+---------+\n| This is | a table |\n+=========+=========+", "\n\n\n\n\n\n\n\n\n
This isa table
", "gridtables|advanced"); + TestParser.TestSpec("+---------+---------+\n| This is | a table |\n+=========+=========+", "\n\n\n\n\n\n\n\n\n
This isa table
", "gridtables|advanced"); } // The last column separator `|` may be omitted: @@ -179,8 +179,8 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // + // + // // // // @@ -190,7 +190,7 @@ namespace Markdig.Tests.Specs.GridTables //
This is
Console.WriteLine("Example 5\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+---------+---------+\n| This is | a table with a longer text in the second column", "\n\n\n\n\n\n\n\n\n
This isa table with a longer text in the second column
", "gridtables|advanced"); + TestParser.TestSpec("+---------+---------+\n| This is | a table with a longer text in the second column", "\n\n\n\n\n\n\n\n\n
This isa table with a longer text in the second column
", "gridtables|advanced"); } // The respective width of the columns are calculated from the ratio between the total size of the first table row without counting the `+`: `+----+--------+----+` would be divided between: @@ -215,9 +215,9 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // - // + // + // + // // // // @@ -228,7 +228,7 @@ namespace Markdig.Tests.Specs.GridTables //
A
Console.WriteLine("Example 6\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+----+--------+----+\n| A | B C D | E |\n+----+--------+----+", "\n\n\n\n\n\n\n\n\n\n\n
AB C DE
", "gridtables|advanced"); + TestParser.TestSpec("+----+--------+----+\n| A | B C D | E |\n+----+--------+----+", "\n\n\n\n\n\n\n\n\n\n\n
AB C DE
", "gridtables|advanced"); } // Alignment might be specified on the first row using the character `:`: @@ -245,9 +245,9 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // - // + // + // + // // // // @@ -258,7 +258,7 @@ namespace Markdig.Tests.Specs.GridTables //
A
Console.WriteLine("Example 7\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+-----+:---:+-----+\n| A | B | C |\n+-----+-----+-----+", "\n\n\n\n\n\n\n\n\n\n\n
ABC
", "gridtables|advanced"); + TestParser.TestSpec("+-----+:---:+-----+\n| A | B | C |\n+-----+-----+-----+", "\n\n\n\n\n\n\n\n\n\n\n
ABC
", "gridtables|advanced"); } // A grid table may have cells spanning both columns and rows: @@ -279,9 +279,9 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // - // + // + // + // // // // @@ -302,7 +302,7 @@ namespace Markdig.Tests.Specs.GridTables //
AAAAA
Console.WriteLine("Example 8\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+---+---+---+\n| AAAAA | B |\n+---+---+ B +\n| D | E | B |\n+ D +---+---+\n| D | CCCCC |\n+---+---+---+", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
AAAAAB\nB\nB
D\nD\nDE
CCCCC
", "gridtables|advanced"); + TestParser.TestSpec("+---+---+---+\n| AAAAA | B |\n+---+---+ B +\n| D | E | B |\n+ D +---+---+\n| D | CCCCC |\n+---+---+---+", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
AAAAAB\nB\nB
D\nD\nDE
CCCCC
", "gridtables|advanced"); } // A grid table may have cells with both colspan and rowspan: @@ -323,9 +323,9 @@ namespace Markdig.Tests.Specs.GridTables // // Should be rendered as: // - // - // - // + // + // + // // // //
AAAAA @@ -345,7 +345,7 @@ namespace Markdig.Tests.Specs.GridTables //
Console.WriteLine("Example 9\nSection Extensions / Grid Table\n"); - TestParser.TestSpec("+---+---+---+\n| AAAAA | B |\n+ AAAAA +---+\n| AAAAA | C |\n+---+---+---+\n| D | E | F |\n+---+---+---+", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
AAAAA\nAAAAA\nAAAAAB
C
DEF
", "gridtables|advanced"); + TestParser.TestSpec("+---+---+---+\n| AAAAA | B |\n+ AAAAA +---+\n| AAAAA | C |\n+---+---+---+\n| D | E | F |\n+---+---+---+", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
AAAAA\nAAAAA\nAAAAAB
C
DEF
", "gridtables|advanced"); } // A grid table may not have irregularly shaped cells: diff --git a/src/Markdig.Tests/Specs/PipeTableSpecs.generated.cs b/src/Markdig.Tests/Specs/PipeTableSpecs.generated.cs index c79b8194..86a7717c 100644 --- a/src/Markdig.Tests/Specs/PipeTableSpecs.generated.cs +++ b/src/Markdig.Tests/Specs/PipeTableSpecs.generated.cs @@ -1,4 +1,4 @@ -// Generated: 2019-04-15 05:54:35 +// Generated: 2020-04-20 07:21:20 // -------------------------------- // Pipe Tables @@ -647,7 +647,7 @@ namespace Markdig.Tests.Specs.PipeTables TestParser.TestSpec("a | b `\n0 | ` ", "

a | b 0 |

", "pipetables|advanced"); } - // **Rule #7** + // **Rule #8** // // A HTML inline has a higher precedence than a column delimiter `|`: [Test] @@ -681,7 +681,7 @@ namespace Markdig.Tests.Specs.PipeTables TestParser.TestSpec("a | b\n-- | --\n0 | 1", "\n\n\n\n\n\n\n\n\n\n\n\n\n
a b
01
", "pipetables|advanced"); } - // **Rule #8** + // **Rule #9** // // Links have a higher precedence than the column delimiter character `|`: [Test] @@ -715,7 +715,7 @@ namespace Markdig.Tests.Specs.PipeTables TestParser.TestSpec("a | b\n-- | --\n[This is a link with a | inside the label](http://google.com) | 1", "\n\n\n\n\n\n\n\n\n\n\n\n\n
ab
This is a link with a | inside the label1
", "pipetables|advanced"); } - // ** Rule #9** + // **Rule #10** // // It is possible to have a single row header only: [Test] @@ -767,7 +767,7 @@ namespace Markdig.Tests.Specs.PipeTables TestParser.TestSpec("|a|b|c\n|---|---|---|", "\n\n\n\n\n\n\n\n
abc
", "pipetables|advanced"); } - // ** Tests ** + // **Tests** // // Tests trailing spaces after pipes [Test] @@ -816,7 +816,7 @@ namespace Markdig.Tests.Specs.PipeTables TestParser.TestSpec("| abc | def | \n|---|---|\n| cde| ddd| \n| eee| fff|\n| fff | fffff | \n|gggg | ffff | ", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
abcdef
cdeddd
eeefff
ffffffff
ggggffff
", "pipetables|advanced"); } - // ** Normalized columns count ** + // **Normalized columns count** // // The tables are normalized to the maximum number of columns found in a table [Test]