Skip to content
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

Redundant | if a table ends with \n element like link #89

Closed
roiros opened this issue Aug 25, 2022 · 0 comments
Closed

Redundant | if a table ends with \n element like link #89

roiros opened this issue Aug 25, 2022 · 0 comments

Comments

@roiros
Copy link
Contributor

roiros commented Aug 25, 2022

I'm getting a redundant | pipe if the last element of the table had \n

{
  "table": {
    "headers": [
      "Col1"
    ],
    "rows": [
      {
        "Col1": {
          "link": {
            "title": "aTitle",
            "source": "http://www.example.com"
          }
        }
      }
    ]
  }
}

json2md output would be

'| Col1 |\n| ---- |\n| [aTitle](http://www.example.com)\n |\n'

Representing:

Col1
aTitle

|


If an additional column (Col2) would be added, the bug (\n in the link) would cause the value in it it to show on the next row
e.g.:

Col1 Col2
aTitle
cola
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

No branches or pull requests

2 participants