-
-
Notifications
You must be signed in to change notification settings - Fork 505
[WIP] Add Normalization Support for PipeTables (GFM) #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Markdig.Tests/TestNormalize.cs
Outdated
| [Test] | ||
| public void PipeTables() | ||
| { | ||
| AssertNormalizeNoTrim("| Foo | Bar |\n| :--- | ---: |\n| Hello World | *World* |"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these asserts fail because the ColumnDefinition is not parsed correctly.
@xoofx Any ideas? I tried to understand the parsing logic but failed miserable ;)
Input: "| Foo | Bar |\n| :--- | ---: |\n| Hello World | World |"
Normalized Output: "| Foo | Bar |\n| :--- | ---: | --- |\n| Hello World | World |\n"
| AssertNormalizeNoTrim("Foo | Bar\n:---: | ---:\nHello | *World*", "| Foo | Bar |\n| :---: | ---: |\n| Hello | *World* |\n"); | ||
| AssertNormalizeNoTrim("| Foo |\n| --- |\n| Hello World |\n"); | ||
| AssertNormalizeNoTrim("| Foo | Bar |\n| --- | --- |\n| Hello World | *World* |\n"); | ||
| AssertNormalizeNoTrim("| Foo | Bar |\n| :--- | ---: |\n| Hello World | *World* |\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last three asserts fail because the ColumnDefinition is not parsed correctly.
@xoofx Any ideas? I tried to understand the parsing logic but failed miserable ;)
Input: "| Foo | Bar |\n| :--- | ---: |\n| Hello World | World |\n"
Normalized Output: "| Foo | Bar |\n| :--- | ---: | --- |\n| Hello World | World |\n"
|
Okay, tried to understand it again. Failed again ;) |
|
@tthiery yeah, sorry, pretty busy recently, will try to have a look |
|
no hurry. this is also just a fun project for me. no reason to make you stressed. |
7874618 to
9c8b101
Compare
DO NOT Merge (see commented source code)
Part of #155
The implementation could be ready but a potential parser bug stops me. See comments.