Table parsing inconsistencies with typescript

Issue #60 resolved
Craig Lawrence created an issue

Inconsistency #1: Rows not closed with a pipe trim spaces

Request

|a 
|c |

Typescript

...
{
              "type": "tableCell",
              "attrs": {},
              "content": [
                {
                  "type": "paragraph",
                  "content": [
                    {
                      "type": "text",
                      "text": "a "
                    }
                  ]
                }
              ]
            }
...

adf-builder-java

...
 {
        "type" : "tableCell",
        "attrs" : { },
        "content" : [ {
          "type" : "paragraph",
          "content" : [ {
            "type" : "text",
            "text" : "a"              <---- space trimmed
          } ]
        }
...

Note that this request produces "text": "a " in both cases:

|a |
|c |

Inconsistency #2:Whitespace after tag with newline

Request TS lib
|{color:#11100f}{color} | Output A Output A
|{color:#11100f}{color} \n| Output A Output B
|{color:#11100f}\n{color} \n| Output A Output B

Output A

{
  "type" : "doc",
  "version" : 1,
  "content" : [ {
    "type" : "table",
    "attrs" : {
      "isNumberColumnEnabled" : false,
      "layout" : "default"
    },
    "content" : [ {
      "type" : "tableRow",
      "content" : [ {
        "type" : "tableCell",
        "attrs" : { },
        "content" : [ {
          "type" : "paragraph",
          "content" : [ {
            "type" : "text",
            "text" : " "
          } ]
        } ]
      } ]
    } ]
  } ]
}

Output B

{
  "type" : "doc",
  "version" : 1,
  "content" : [ {
    "type" : "table",
    "attrs" : {
      "isNumberColumnEnabled" : false,
      "layout" : "default"
    },
    "content" : [ {
      "type" : "tableRow",
      "content" : [ {
        "type" : "tableCell",
        "attrs" : { },
        "content" : [ {
          "type" : "paragraph",
          "content" : [ ]
        } ]
      } ]
    } ]
  } ]
}

Comments (10)

  1. Log in to comment