{"id":18597855,"url":"https://github.com/liascript/markdownify","last_synced_at":"2025-05-16T14:10:16.186Z","repository":{"id":183668578,"uuid":"670548870","full_name":"LiaScript/Markdownify","owner":"LiaScript","description":"Create LiaScript documents from a common JSON-model","archived":false,"fork":false,"pushed_at":"2023-07-26T20:00:18.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-17T23:46:33.891Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiaScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-25T09:50:38.000Z","updated_at":"2023-07-25T09:53:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd6be80b-4978-45f9-a295-4100575104f9","html_url":"https://github.com/LiaScript/Markdownify","commit_stats":null,"previous_names":["liascript/markdownify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaScript%2FMarkdownify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaScript%2FMarkdownify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaScript%2FMarkdownify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaScript%2FMarkdownify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiaScript","download_url":"https://codeload.github.com/LiaScript/Markdownify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544159,"owners_count":22088808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T01:29:39.418Z","updated_at":"2025-05-16T14:10:16.142Z","avatar_url":"https://github.com/LiaScript.png","language":"Elm","readme":"# LiaScript-Markdownify\n\nCreate LiaScript documents from a common JSON-model\n\n## Install\n\nInstall directly via npm:\n\n``` bash\nnpm install @liascript/markdownify\n```\n\n## Usage\n\nCurrently there is only one function that takes as an input-parameter either a string or a JSON/Object directly.\n`liascriptify` will return a promise that will either return the correct LiaScript-Markdown document or it will return an error message.\n\n\n``` typescript\nimport liascriptify from './node_modules/@liascript/markdownify/dist/lib'\n\nconst example = {\n  meta: {\n    author: 'Superhero',\n    email: 'superhero@web.de',\n  },\n  sections: [\n    {\n      title: 'Title',\n      indent: 1,\n      body: [\n        'This can be either a list of Strings',\n        'that are interpreted as Markdown-blocks',\n        {\n          paragraph: [\n            { string: 'Or a set of ' },\n            {\n              bold: [\n                { string: 'more sophisticated '},\n                { superscript: 'elements' },\n              ],\n            },\n            '!',\n          ],\n        },\n      ],\n    },\n  ],\n}\n\nliascriptify(example)\n  .then((doc: string) =\u003e {\n    console.log('ok', doc)\n  })\n  .catch((err: string) =\u003e {\n    console.warn('err', err)\n  })\n```\n\n## Base structure\n\nThe basic structure of a LiaScript-Json format is rather simple, you can either directly pass Markdown as a string or you can break it down to collections of block and inline elements. Every Json-file has the following structure:\n\n``` json\n{\n  \"meta\": {\n    \"author\": \"Superhero\",\n    \"email\": \"superhero@web.de\"\n  },\n  \"sections\": [\n    {\n      \"title\": \"Main Title\",\n      \"indent\": 1,\n      \"body\": [\n        \"This can be either a list of Strings\",\n        \"that are interpreted as Markdown-blocks\",\n        {\n          \"paragraph\": [\n            {\n              \"string\": \"Or a set of \"\n            },\n            {\n              \"bold\": [\n                {\n                  \"string\": \"more sophisticated \"\n                },\n                {\n                  \"superscript\": \"elements\"\n                }\n              ]\n            },\n            \"!\"\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\nThe `meta` fields are optional, but you can define a global filed on top that will define the main-header. The `sections` are required and are a list of single \"pages\", which consists of a `title`, `indent`, and a `body` for the content. Additionally it is possible to add another `meta` field to every section.\n\n``` markdown\n\u003c!--\n\nauthor: Superhero\n\nemail: superhero@web.de\n\n--\u003e\n\n\n# Main Title\n\nThis can be either a list of Strings\n\nthat are interpreted as Markdown-blocks\n\nOr a set of __more sophisticated ^elements^__!\n```\n\n## Body: Block-Elements\n\n``` markdown\n# Body 1\n\nIt is possible to pass directly valid __LiaScript/Markdown__ code to the body.\n\nThis can contain multiple blocks that are separated by newlines.\n\n\n## Body 2\n\nOr to keep it clean\n\nYou can pass multiple strings, that are treated as blocks\n\n... each\n```\n\n---\n\n``` json\n{\n  \"sections\": [\n    {\n      \"title\": \"Body 1\",\n      \"indent\": 1,\n      \"body\": \"It is possible to pass directly valid __LiaScript/Markdown__ code to the body.\\n\\nThis can contain multiple blocks that are separated by newlines.\"\n    },\n    {\n      \"title\": \"Body 2\",\n      \"indent\": 2,\n      \"body\": [\n        \"Or to keep it clean\",\n        \"You can pass multiple strings, that are treated as blocks\",\n        \"... each\"\n      ]\n    }\n  ]\n}\n```\n\n\n\n## Blocks\n\n### Paragraphs\n\n``` markdown\n### `paragraph` or `p`\n\nA paragraph is either a string,\n\nbut it can also__be a simple list__^of multiple $ inline elements $^.\n```\n\n---\n\n``` json\n{\n  \"indent\": 3,\n  \"title\": \"`paragraph` or `p`\",\n  \"body\": [\n    {\n      \"paragraph\": \"A paragraph is either a string,\"\n    },\n    {\n      \"paragraph\": [\n        \"but it can also\",\n        {\n          \"bold\": [\n            {\n              \"string\": \"be a simple list\"\n            }\n          ]\n        },\n        {\n          \"superscript\": [\n            \"of multiple \",\n            {\n              \"formula\": \"inline elements\"\n            }\n          ]\n        },\n        \".\"\n      ]\n    }\n  ]\n}\n```\n\n### Unordered Lists\n\n``` markdown\n### `unordered list` or `ul`\n\n* is either a list of strings,\n\n* \u003c!-- style=color: red; --\u003e\n  or a list of further Blocks an tables.\n\n* But it is also possible\n  \n  * put group multiple blocks into\n  \n  * a single list\n```\n\n---\n\n``` json\n{\n  \"title\": \"`unordered list` or `ul`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"unordered list\": [\n        \"is either a list of strings,\",\n        {\n          \"paragraph\": \"or a list of further Blocks an tables.\",\n          \"attributes\": {\n            \"style\": \"color: red;\"\n          }\n        },\n        [\n          \"But it is also possible\",\n          {\n            \"ul\": [\"put group multiple elements within\", \"a single list\"]\n          }\n        ]\n      ]\n    }\n  ]\n}\n```\n\n\n### Ordered Lists\n\n``` markdown\n### `ordered list` or `ol`\n\n1. behave similar to unordered lists,\n\n2. the only __difference__ is\n\n3. \u003c!-- style=color: red; --\u003e\n   that the blocks are identified by their appearance.\n\n4. Grouping works exactly the same way,\n   \n   1. simply put multiple elements\n   \n   2. into a single list\n```\n\n-------------\n\n``` json\n{\n  \"title\": \"`ordered list` or `ol`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"ordered list\": [\n        \"behave similar to unordered lists,\",\n        {\n          \"paragraph\": \"the only __difference__ is\"\n        },\n        {\n          \"paragraph\": \"that the blocks are identified by their appearance.\",\n          \"attributes\": {\n            \"style\": \"color: red;\"\n          }\n        },\n        [\n          \"Grouping works exactly the same way,\",\n          {\n            \"ul\": [\"simply put multiple elements\", \"into a single list\"]\n          }\n        ]\n      ]\n    }\n  ]\n}\n```\n\n### Horizontal Rule\n\n``` markdown\n### `horizontal rule` or `hr`\n\nA horizontal rule is a simple line that separates two blocks:\n\n---\n\nor\n\n---\n```\n\n---\n\n``` json\n{\n  \"title\": \"`horizontal rule` or `hr`\",\n  \"indent\": 3,\n  \"body\": [\n    \"A horizontal rule is a simple line that separates two blocks:\",\n    {\n      \"hr\": null\n    },\n    \"or\",\n    {\n      \"horizontal rule\": null\n    }\n  ]\n}\n```\n\n### Blockquotes\n\n``` markdown\n### `blockquote` or `q`\n\n\u003e This can also be a simple string...\n\n---\n\n\u003e __A list of multiple strings__\n\u003e \n\u003e These are interpreted as separate blocks\n\n---\n\n\u003e Or a combination\n\u003e \n\u003e \u003e of various different blocks\n\u003e \u003e \n\u003e \u003e * lists\n\u003e \u003e \n\u003e \u003e * blockquotes\n\u003e \u003e \n\u003e \u003e * tables\n\u003e \u003e \n\u003e \u003e * etc.\n```\n\n---\n\n``` json\n{\n  \"title\": \"`blockquote` or `q`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"blockquote\": \"This can also be a simple string...\"\n    },\n    {\n      \"hr\": null\n    },\n    {\n      \"blockquote\": [\n        \"__A list of multiple strings__\",\n        \"These are interpreted as separate blocks\"\n      ]\n    },\n    {\n      \"hr\": null\n    },\n    {\n      \"blockquote\": [\n        {\n          \"paragraph\": \"Or a combination\"\n        },\n        {\n          \"q\": [\n            \"of various different blocks\",\n            {\n              \"ul\": [\n                \"lists\",\n                \"blockquotes\",\n                \"tables\",\n                \"etc.\"\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\n### Citation\n\n``` markdown\n### `citation` or `cite`\n\nCitations are a special LiaScript case of a blockquote, which will be rendered differently, but behave like normal blockquotes.\n\n\u003e If you want your children to be intelligent, read them fairy tales.If you want them to be more intelligent, read them more fairy tales.\n\u003e \n\u003e -- Albert Einstein\n```\n\n---\n\n``` json\n{\n  \"title\": \"`citation` or `cite`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"paragraph\": \"Citations are a special LiaScript case of a blockquote, which will be rendered differently, but behave like normal blockquotes.\"\n    },\n    {\n      \"citation\": [\n        {\n          \"p\": [\n            \"If you want your children to be intelligent, read them fairy tales.\",\n            \"If you want them to be more intelligent, read them more fairy tales.\"\n          ]\n        }\n      ],\n      \"by\": \"Albert Einstein\"\n    }\n  ]\n}\n```\n\n### Comments \u0026 TTS\n\n``` markdown\n### `comment`\n\n    --{{1 Ukrainian Female}}--\nComments in LiaScript are these parts that are spoken out loud.They will be displayed only in `Textbook` mode.Every comment requires an `id`, to mark the animation step, when it should be spoken out loud.Additionally you can set the voice, which is optional in contrast to the id.\n```\n\n---\n\n``` json\n{\n  \"title\": \"`comment`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"comment\": [\n        \"Comments in LiaScript are these parts that are spoken out loud.\",\n        \"They will be displayed only in `Textbook` mode.\",\n        \"Every comment requires an `id`, to mark the animation step, when it should be spoken out loud.\",\n        \"Additionally you can set the voice, which is optional in contrast to the id\"\n      ],\n      \"id\": 1,\n      \"voice\": \"Ukrainian Female\"\n    }\n  ]\n}\n```\n\n### ASCII-Art\n\n```` markdown\n### `ascii art` or `ascii`\n\n``` ascii    Title is optional and will be displayed as an image __caption__\n+------+   +-----+   +-----+   +-----+\n|      |   |     |   |     |   |     |\n| Foo  +--\u003e| Bar +---+ Baz |\u003c--+ Moo |\n|      |   |     |   |     |   |     |\n+------+   +-----+   +--+--+   +-----+\n              ^         |\n              |         V\n.-------------+-----------------------.\n| Hello here and there and everywhere |\n'-------------------------------------'\n```\n````\n\n---\n\n``` json\n{\n  \"title\": \"`ascii art` or `ascii`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"ascii\": [\n        \"+------+   +-----+   +-----+   +-----+\",\n        \"|      |   |     |   |     |   |     |\",\n        \"| Foo  +--\u003e| Bar +---+ Baz |\u003c--+ Moo |\",\n        \"|      |   |     |   |     |   |     |\",\n        \"+------+   +-----+   +--+--+   +-----+\",\n        \"              ^         |\",\n        \"              |         V\",\n        \".-------------+-----------------------.\",\n        \"| Hello here and there and everywhere |\",\n        \"'-------------------------------------'\"\n      ],\n      \"title\": \"  Title is optional and will be displayed as an image __caption__\"\n    }\n  ]\n}\n```\n\n### Charts\n\n``` markdown\n### `chart` or `diagram`\n\n                                diagram title       \n    1.5 |           *                     (* stars) \n        |                                           \n      y |        *      *                           \n      - |      *          *                         \n      a |     *             *       *               \n      x |    *                 *                    \n      i |   *                                       \n      s |  *                                        \n        | *                              *        * \n      0 +------------------------------------------ \n       2.0              x-axis                100 \n```\n\n---\n\n``` json\n{\n  \"title\": \"`chart` or `diagram`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"chart\": [\n        \"                            diagram title       \",\n        \"1.5 |           *                     (* stars) \",\n        \"    |                                           \",\n        \"  y |        *      *                           \",\n        \"  - |      *          *                         \",\n        \"  a |     *             *       *               \",\n        \"  x |    *                 *                    \",\n        \"  i |   *                                       \",\n        \"  s |  *                                        \",\n        \"    | *                              *        * \",\n        \"  0 +------------------------------------------ \",\n        \"   2.0              x-axis                100   \"\n      ]\n    }\n  ]\n}\n```\n\n\n### Quizzes\n\n\n#### Text-Input\n\n``` markdown\n#### `text`\n\nWhat did the fish say, when he hit the wall?\n\n[[dam]]\n```\n\n#### Selection\n\n``` markdown\n#### `selection`\n\nThe solution is defined by its position in the option list\n\n[[option 0 | ( option 1 ) | __this is Bold and wrong__]]\n```\n\n#### Single-Choice\n\n``` markdown\n#### `single-choice`\n\nWhat did the fish say, when he hit the wall?\n\n- [( )] option 0\n- [(X)] option 1\n- [( )] __option 3__\n```\n\n#### Multiple-Choice\n\n``` markdown\n#### `multiple-choice`\n\nWhat did the fish say, when he hit the wall?\n\n- [[ ]] option 0\n- [[X]] option 1\n- [[X]] __option 3__\n```\n\n#### Gap-Text\n\n``` markdown\n#### `gap-text`\n\nWhat did the fish say, when he hit the wall?\n\n__Some Inlines__ [[damn]] some more test [[ option1 | ( option2 ) | option3 ]] some more test \n```\n\n---\n\n``` json\n{\n  \"title\": \"`gap-text`\",\n  \"indent\": 4,\n  \"body\": [\n    \"What did the fish say, when he hit the wall?\",\n    {\n      \"quiz\": \"gap-text\",\n      \"body\": {\n        \"p\": [\n          {\n            \"bold\": \"Some Inlines\"\n          },\n          \" \",\n          {\n            \"input\": \"text\",\n            \"solution\": \"damn\"\n          },\n          \" some more test \",\n          {\n            \"input\": \"selection\",\n            \"solution\": 1,\n            \"options\": [\n              \"option1\",\n              \"option2\",\n              \"option3\"\n            ]\n          },\n          \" some more test \"\n        ]\n      }\n    }\n  ]\n}\n```\n\n#### Tweaks\n\n``` markdown\n#### `selection` part 2\n\nThe solution is defined by its position in the option list...\n\n... But, as there are multiple options, you can define also multiple solutions too.\n\n\u003c!-- data-trials=5 --\u003e\n[[( option 0 ) | option 1 | ( __this is Bold__ )]]\n[[?]] hint number one\n[[?]] the second and last hint\n************************\n\nThese blocks will only be visible...\n\n... if and only if, the quiz is solved\n\nor if the user clicks onto the resolve button.\n\n************************\n```\n\n---\n\n``` json\n{\n  \"title\": \"`selection` part 2\",\n  \"indent\": 4,\n  \"body\": [\n    \"The solution is defined by its position in the option list...\",\n    \"... But, as there are multiple options, you can define also multiple solutions too.\",\n    {\n      \"quiz\": \"selection\",\n      \"solution\": [\n        0,\n        2\n      ],\n      \"options\": [\n        \"option 0\",\n        \"option 1\",\n        [\n          {\n            \"bold\": \"this is Bold\"\n          }\n        ]\n      ],\n      \"hints\": [\n        \"hint number one\",\n        \"the second and last hint\"\n      ],\n      \"answer\": [\n        \"These blocks will only be visible...\",\n        \"... if and only if, the quiz is solved\",\n        \"or if the user clicks onto the resolve button.\"\n      ],\n      \"attributes\": {\n        \"data-trials\": \"5\"\n      }\n    }\n  ]\n}\n```\n\n### Surveys\n\nTODO\n\n### Gallery\n\n``` markdown\n### `gallery`\n\nA gallery is simply a collection of multimedia links\n\n![LiaScript Live-Editor](https://liascript.github.io/img/LiveEditor.jpg \"More and optional information.\")\n?[Magnetic's ELM Podcast: One More Summer Sun](https://soundcloud.com/magnetic-magazine/magnetics-elm-podcast-one-more)\n!?[Some random video](https://www.youtube.com/watch?v=q_Usix3nyGA)\n??[](https://falstad.com/circuit/circuitjs.html)\n```\n\n---\n\n``` json\n{\n  \"title\": \"`gallery`\",\n  \"indent\": 3,\n  \"body\": [\n    \"A gallery is simply a collection of multimedia links\",\n    {\n      \"gallery\": [\n        {\n          \"link\": \"image\",\n          \"url\": \"https://liascript.github.io/img/LiveEditor.jpg\",\n          \"alt\": \"LiaScript Live-Editor\",\n          \"title\": \"More and optional information.\"\n        },\n        {\n          \"link\": \"audio\",\n          \"url\": \"https://soundcloud.com/magnetic-magazine/magnetics-elm-podcast-one-more\",\n          \"alt\": \"Magnetic's ELM Podcast: One More Summer Sun\"\n        },\n        {\n          \"link\": \"video\",\n          \"url\": \"https://www.youtube.com/watch?v=q_Usix3nyGA\",\n          \"alt\": \"Some random video\"\n        },\n        {\n          \"link\": \"embed\",\n          \"url\": \"https://falstad.com/circuit/circuitjs.html\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n### Tasks\n\n``` markdown\n### `tasks`\n\nTasks are defined by a task and by a done list:\n\n- [X] task 1\n- [ ] task 2\n- [X] task 3\n\nAdditionally it is possible to define a done list with only checked positions:\n\n- [X] task 1\n- [ ] task 2\n- [X] task 3\n```\n\n---\n\n``` json\n{\n  \"title\": \"`tasks`\",\n  \"indent\": 3,\n  \"body\": [\n    \"Tasks are defined by a task and by a done list:\",\n    {\n      \"tasks\": [\"task 1\", \"task 2\", \"task 3\"],\n      \"done\": [true, false, true]\n    },\n    \"Additionally it is possible to define a done list with only checked positions:\",\n    {\n      \"tasks\": [\"task 1\", \"task 2\", \"task 3\"],\n      \"done\": [0, 2]\n    }\n  ]\n}\n```\n\n### Tables\n\n``` markdown\n### `table`\n\nTables are defined by a head and a row, the orientation is optional\n\n| head 1 | head 2 | __head 3__ |\n| :----- | -----: | :--------: |\n| 1      |      2 |      3     |\n| 4      |      5 |      6     |\n| 7      |      8 |      9     |\n```\n\n---\n\n``` json\n{\n  \"title\": \"`table`\",\n  \"indent\": 3,\n  \"body\": [\n    \"Tables are defined by a head and a row, the orientation is optional\",\n    {\n      \"table\": {\n        \"head\": [\"head 1\", \"head 2\", [{ \"bold\": \"head 3\" }]],\n        \"orientation\": [\"left\", \"right\", \"center\"],\n        \"rows\": [\n          [\"1\", \"2\", \"3\"],\n          [\"4\", \"5\", \"6\"],\n          [\"7\", \"8\", \"9\"]\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Code-Snippets\n\nThe code is passed as a single string or a list of strings, language, name, and closed are optional parameters.\n\n```` markdown\n### `code`\n\n``` javascript   -test.js\nThis is a simple code block\nwith multiple lines\nand a specific language\nfor syntax highlighting\n```\n````\n\n---\n\n``` json\n{\n  \"title\": \"`code`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"code\": [\n        \"This is a simple code block\",\n        \"with multiple lines\",\n        \"and a specific language\",\n        \"for syntax highlighting\"\n      ],\n      \"language\": \"javascript\",\n      \"name\": \"test.js\",\n      \"closed\": true\n    }\n  ]\n}\n```\n\n### Projects\n\nA project can be defined by a single code-block or by a list of code-blocks.\nAdditionally it is possible to add an appendix, which is either a script or a macro that evaluates to a script, and that defines how the code can be made executable.\n\n\n```` markdown\n### `project`\n\n``` javascript   var.js\nvar i = 0;\n```\n``` javascript   alert.js\nalert(\"Hallo Welt\")\n```\n@eval\n````\n\n---\n\n``` json\n{\n  \"title\": \"`project`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"project\": [\n        {\n          \"code\": \"var i = 0;\",\n          \"language\": \"javascript\",\n          \"name\": \"var.js\"\n        },\n        {\n          \"code\": \"alert(\\\"Hallo Welt\\\")\",\n          \"language\": \"javascript\",\n          \"name\": \"alert.js\"\n        }\n      ],\n      \"appendix\": \"@eval\"\n    }\n  ]\n}\n```\n\n### HTML\n\n``` markdown\n### `html`\n\n\u003csection \"style\"=\"color: red;\"\u003eThis is a simple HTML element\u003c/section\u003e\n```\n\n---\n\n``` json\n{\n  \"title\": \"`html`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"html\": \"section\",\n      \"body\": [{ \"paragraph\": \"This is a simple HTML element\" }],\n      \"attributes\": {\n        \"style\": \"color: red;\"\n      }\n    }\n  ]\n}\n```\n\n## Inline Elements\n\n``` markdown\n### Inline Elements`\n\nfinal strings are normal strings or string objects\n\nAdditionally it is possible to add attributes to all inline-elements\u003c!-- \"style\"=\"color: green; display: block\" --\u003e\n\n__this is a bold string__\n\n_this is a italic string_\n\n___this is a bold and italic string___\n\n~~this is a underlined string~~ ~this is a striked string~ ~~this is a underlined ~and striked string~~~\n\n^this is a superscript string^\n\nThis is a $ \\frac{1}{x} $\n\nA code `__Verbatim code__`\n\nAnd a piece of \u003cspan \"id\"=\"foo\" \"style\"=\"color: green; display: block\"\u003econtent\u003c/span\u003e\n```\n\n\n----\n\n``` json\n{\n  \"title\": \"Inline Elements`\",\n  \"indent\": 3,\n  \"body\": [\n    {\n      \"p\": [\n        \"final strings are normal strings or \",\n        { \"string\": \"string objects\" }\n      ]\n    },\n    {\n      \"p\": [\n        \"Additionally it is possible to add attributes to all \",\n        {\n          \"string\": \"inline-elements\",\n          \"attributes\": { \"style\": \"color: green; display: block\" }\n        }\n      ]\n    },\n    {\n      \"p\": [\n        {\n          \"bold\": \"this is a bold string\"\n        }\n      ]\n    },\n    {\n      \"p\": [\n        {\n          \"italic\": \"this is a italic string\"\n        }\n      ]\n    },\n    {\n      \"p\": [\n        {\n          \"bold\": [{ \"italic\": \"this is a bold and italic string\" }]\n        }\n      ]\n    },\n    {\n      \"p\": [\n        {\n          \"underline\": \"this is a underlined string\"\n        },\n        \" \",\n        {\n          \"strike\": \"this is a striked string\"\n        },\n        \" \",\n        {\n          \"underline\": [\n            \"this is a underlined \",\n            {\n              \"strike\": \"and striked string\"\n            }\n          ]\n        }\n      ]\n    },\n    { \"p\": [{ \"superscript\": \"this is a superscript string\" }] },\n    { \"p\": [\"This is a \", { \"formula\": \"\\\\frac{1}{x}\" }] },\n    { \"p\": [\"A code \", { \"verbatim\": \"__Verbatim code__\" }] },\n    {\n      \"p\": [\n        \"And a piece of \",\n        {\n          \"html\": \"span\",\n          \"body\": \"content\",\n          \"attributes\": {\n            \"id\": \"foo\",\n            \"style\": \"color: green; display: block\"\n          }\n        }\n      ]\n    }\n  ]\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliascript%2Fmarkdownify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliascript%2Fmarkdownify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliascript%2Fmarkdownify/lists"}