Skip to content

Conversation

@tthiery
Copy link

@tthiery tthiery commented Dec 17, 2017

DO NOT Merge (see commented source code)

Part of #155

The implementation could be ready but a potential parser bug stops me. See comments.

[Test]
public void PipeTables()
{
AssertNormalizeNoTrim("| Foo | Bar |\n| :--- | ---: |\n| Hello World | *World* |");
Copy link
Author

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");
Copy link
Author

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"

@tthiery
Copy link
Author

tthiery commented Feb 16, 2018

Okay, tried to understand it again. Failed again ;)

@xoofx
Copy link
Owner

xoofx commented Feb 16, 2018

@tthiery yeah, sorry, pretty busy recently, will try to have a look

@tthiery
Copy link
Author

tthiery commented Feb 16, 2018

no hurry. this is also just a fun project for me. no reason to make you stressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants