ftml 1.30.0

Foundation Text Markup Language - a library to render Wikidot text as HTML
Documentation
{
    "input": "+++++ H5\n+++++* H5!\n++* H2!\n+ H1\n\n+++* H3!\n++ H2 ++\n",
    "tree": {
        "elements": [
            {
                "element": "container",
                "data": {
                    "type": {
                        "header": {
                            "level": 5,
                            "has-toc": true
                        }
                    },
                    "attributes": {},
                    "elements": [
                        {
                            "element": "text",
                            "data": "H5"
                        }
                    ]
                }
            },
            {
                "element": "container",
                "data": {
                    "type": {
                        "header": {
                            "level": 5,
                            "has-toc": false
                        }
                    },
                    "attributes": {},
                    "elements": [
                        {
                            "element": "text",
                            "data": "H5"
                        },
                        {
                            "element": "text",
                            "data": "!"
                        }
                    ]
                }
            },
            {
                "element": "container",
                "data": {
                    "type": {
                        "header": {
                            "level": 2,
                            "has-toc": false
                        }
                    },
                    "attributes": {},
                    "elements": [
                        {
                            "element": "text",
                            "data": "H2"
                        },
                        {
                            "element": "text",
                            "data": "!"
                        }
                    ]
                }
            },
            {
                "element": "container",
                "data": {
                    "type": {
                        "header": {
                            "level": 1,
                            "has-toc": true
                        }
                    },
                    "attributes": {},
                    "elements": [
                        {
                            "element": "text",
                            "data": "H1"
                        }
                    ]
                }
            },
            {
                "element": "container",
                "data": {
                    "type": {
                        "header": {
                            "level": 3,
                            "has-toc": false
                        }
                    },
                    "attributes": {},
                    "elements": [
                        {
                            "element": "text",
                            "data": "H3"
                        },
                        {
                            "element": "text",
                            "data": "!"
                        }
                    ]
                }
            },
            {
                "element": "container",
                "data": {
                    "type": {
                        "header": {
                            "level": 2,
                            "has-toc": true
                        }
                    },
                    "attributes": {},
                    "elements": [
                        {
                            "element": "text",
                            "data": "H2"
                        },
                        {
                            "element": "text",
                            "data": " "
                        },
                        {
                            "element": "text",
                            "data": "++"
                        }
                    ]
                }
            },
            {
                "element": "footnote-block",
                "data": {
                    "title": null,
                    "hide": false
                }
            }
        ],
        "html-blocks": [
        ],
        "code-blocks": [
        ],
        "table-of-contents": [
            {
                "element": "list",
                "data": {
                    "type": "bullet",
                    "attributes": {},
                    "items": [
                        {
                            "item-type": "sub-list",
                            "element": "list",
                            "data": {
                                "type": "bullet",
                                "attributes": {},
                                "items": [
                                    {
                                        "item-type": "sub-list",
                                        "element": "list",
                                        "data": {
                                            "type": "bullet",
                                            "attributes": {},
                                            "items": [
                                                {
                                                    "item-type": "sub-list",
                                                    "element": "list",
                                                    "data": {
                                                        "type": "bullet",
                                                        "attributes": {},
                                                        "items": [
                                                            {
                                                                "item-type": "sub-list",
                                                                "element": "list",
                                                                "data": {
                                                                    "type": "bullet",
                                                                    "attributes": {},
                                                                    "items": [
                                                                        {
                                                                            "item-type": "elements",
                                                                            "attributes": {},
                                                                            "elements": [
                                                                                {
                                                                                    "element": "link",
                                                                                    "data": {
                                                                                        "type": "table-of-contents",
                                                                                        "link": "#toc0",
                                                                                        "label": {
                                                                                            "text": "H5"
                                                                                        },
                                                                                        "target": null
                                                                                    }
                                                                                }
                                                                            ]
                                                                        }
                                                                    ]
                                                                }
                                                            }
                                                        ]
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "item-type": "elements",
                            "attributes": {},
                            "elements": [
                                {
                                    "element": "link",
                                    "data": {
                                        "type": "table-of-contents",
                                        "link": "#toc1",
                                        "label": {
                                            "text": "H1"
                                        },
                                        "target": null
                                    }
                                }
                            ]
                        },
                        {
                            "item-type": "sub-list",
                            "element": "list",
                            "data": {
                                "type": "bullet",
                                "attributes": {},
                                "items": [
                                    {
                                        "item-type": "elements",
                                        "attributes": {},
                                        "elements": [
                                            {
                                                "element": "link",
                                                "data": {
                                                    "type": "table-of-contents",
                                                    "link": "#toc2",
                                                    "label": {
                                                        "text": "H2 ++"
                                                    },
                                                    "target": null
                                                }
                                            }
                                        ]
                                    }
                                ]
                            }
                        }
                    ]
                }
            }

        ],
        "footnotes": [
        ],
        "bibliographies": [
        ]
    },
    "errors": [
    ]
}