linkareti / keystone6-document-renderer-vue3

Keystone 6 document renderer component for Vue 3
MIT License
1 stars 1 forks source link

Document render only renders the first child #1

Closed N0NamedGuy closed 7 months ago

N0NamedGuy commented 7 months ago

The rendering fails with the following JSON documents.

On the the following document:

{
  "document": [
    {
      "type": "heading",
      "children": [
        {
          "text": "Wanna learn how to sysadmin?"
        }
      ],
      "level": 1
    },
    {
      "type": "paragraph",
      "children": [
        {
          "text": "Don't ask"
        },
        {
          "text": " me",
          "italic": true
        },
        {
          "text": "… ask "
        },
        {
          "text": "Filipe",
          "bold": true
        },
        {
          "text": "!"
        }
      ]
    },
    {
      "type": "paragraph",
      "children": [
        {
          "text": ""
        }
      ]
    }
  ]
}

The sentence

Don't ask

is rendered, missing the rest of the children. It should be formatted as

Don't ask me ask Filipe!

N0NamedGuy commented 7 months ago

Here is another document which does not render properly

{
  "document": [
    {
      "type": "paragraph",
      "children": [
        {
          "text": "Start text "
        },
        {
          "text": "bold text",
          "bold": true
        },
        {
          "text": " rest of the text \n"
        }
      ]
    },
    {
      "type": "paragraph",
      "children": [
        {
          "text": ""
        }
      ]
    }
  ]
}

Only the text

Start text

is rendered. While it should be rendered as

Start text bold text rest of the text

N0NamedGuy commented 7 months ago

The issue has been fixed, pending release.