{"id":15600431,"url":"https://github.com/jason-fox/fox.jason.pretty-dita","last_synced_at":"2025-03-29T12:23:04.620Z","repository":{"id":54682431,"uuid":"175011453","full_name":"jason-fox/fox.jason.pretty-dita","owner":"jason-fox","description":" DITA prettifier plug-in which formats DITA XML in an aesthetically pleasing manner","archived":false,"fork":false,"pushed_at":"2024-02-18T07:40:01.000Z","size":457,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T13:27:24.794Z","etag":null,"topics":["dita","dita-ot","dita-ot-plugin","formatter","prettifier"],"latest_commit_sha":null,"homepage":"https://jason-fox.github.io/dita-ot-plugins/pretty-dita","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jason-fox.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":"2019-03-11T13:57:17.000Z","updated_at":"2023-10-04T12:33:06.000Z","dependencies_parsed_at":"2024-12-09T17:24:51.045Z","dependency_job_id":"f480ac4a-2a81-46a9-afcb-aafa68eedc6f","html_url":"https://github.com/jason-fox/fox.jason.pretty-dita","commit_stats":{"total_commits":134,"total_committers":3,"mean_commits":"44.666666666666664","dds":0.02238805970149249,"last_synced_commit":"59c813949c2ce116e3d5eaa534a304fda9a2ac7a"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.pretty-dita","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.pretty-dita/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.pretty-dita/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.pretty-dita/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jason-fox","download_url":"https://codeload.github.com/jason-fox/fox.jason.pretty-dita/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246182241,"owners_count":20736722,"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":["dita","dita-ot","dita-ot-plugin","formatter","prettifier"],"created_at":"2024-10-03T02:02:57.983Z","updated_at":"2025-03-29T12:23:04.598Z","avatar_url":"https://github.com/jason-fox.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pretty DITA for DITA-OT [\u003cimg src=\"https://jason-fox.github.io/fox.jason.pretty-dita/pretty-dita.png\" align=\"right\" width=\"300\"\u003e](https://pretty-dita-ot.rtfd.io/)\n\n[![license](https://img.shields.io/github/license/jason-fox/fox.jason.pretty-dita.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![DITA-OT 4.2](https://img.shields.io/badge/DITA--OT-4.2-green.svg)](http://www.dita-ot.org/4.2)\n[![CI](https://github.com/jason-fox/fox.jason.pretty-dita/workflows/CI/badge.svg)](https://github.com/jason-fox/fox.jason.pretty-dita/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/jason-fox/fox.jason.pretty-dita/badge.svg?branch=master)](https://coveralls.io/github/jason-fox/fox.jason.pretty-dita?branch=master)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fox.jason.pretty-dita\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=fox.jason.pretty-dita)\n\nThis is a DITA prettifier [DITA-OT Plug-in](https://www.dita-ot.org/plugins) which formats DITA XML in an aesthetically\npleasing manner. `\u003ctopic\u003e` elements, `\u003csection\u003e` elements, `\u003cp\u003e` elements etc are regularly indented so the raw DITA XML\nfiles can be scanned by humans:\n\n### Unformatted DITA\n\nA typical DITA file can contain long lines, missing carriage returns and un-aligned elements:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE topic PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"topic.dtd\"\u003e\n\u003ctopic id=\"basic-usage\"\u003e\u003ctitle\u003eBasic usage\u003c/title\u003e\u003cbody outputclass=\"language-markup\"\u003e\n\u003cp\u003eYou will need to include the \u003ccodeph\u003eprism.css\u003c/codeph\u003e and \u003ccodeph\u003eprism.js\u003c/codeph\u003e files you downloaded in your page. Example:\n\u003c/p\u003e\n\u003ccodeblock\u003e\u0026lt;!DOCTYPE html\u0026gt;\n\u0026lt;html\u0026gt;\n\u0026lt;head\u0026gt;\n  ...\n  \u0026lt;link href=\"themes/prism.css\" rel=\"stylesheet\" /\u0026gt;\n  \u0026gt;\u0026lt;/head\u0026gt;\n\u0026lt;body\u0026gt;\n  ...\n  \u0026lt;script src=\"prism.js\"\u0026gt;\u0026lt;/script\u0026gt;\n  \u0026lt;/body\u0026gt;\n\u0026lt;/html\u0026gt;\u003c/codeblock\u003e\n   \u003cp\u003ePrism does its best to encourage good authoring practices.  Therefore,it only works with \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e elements,  since marking upcode without a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e element is semantically invalid.\u003cxref format=\"html\" scope=\"external\" href=\"https://www.w3.org/TR/html52/textlevel-semantics.html#the-code-element\"\u003eAccording to the HTML5 spec\u003c/xref\u003e, the recommended way to define a code language is a \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class, which is what Prism uses. Alternatively, Prism also supports a shorter version: \u003ccodeph\u003elang-xxxx\u003c/codeph\u003e.\n\u003c/p\u003e\n    \u003cp\u003e To make things easier however, Prism assumes that this language definition is inherited. Therefore, if multiple \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e elements have the same language, you can add the \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class on one of their common ancestors. This way, you can also define a document-wide default language, by adding a \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class on the \u003ccodeph\u003e\u0026lt;body\u0026gt;\u003c/codeph\u003e or \u003ccodeph\u003e\u0026lt;html\u0026gt;\u003c/codeph\u003e element.\u003c/p\u003e\n   \u003cp\u003e If you want to opt-out of highlighting for a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e element that is a descendant of an element with a declared code language, you can add the class \u003ccodeph\u003elanguage-none\u003c/codeph\u003e to it (or any non-existing language, really).\n  \u003c/p\u003e\n\u003cp\u003e The \u003cxref format=\"html\" scope=\"external\" href=\"https://www.w3.org/TR/html5/grouping-content.html#the-pre-element\"\u003erecommended way to mark up a code block\u003c/xref\u003e (both for semantics and for Prism) is a \u003ccodeph\u003e\u0026lt;pre\u0026gt;\u003c/codeph\u003e element with a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e element inside, like so:\n\u003c/p\u003e\n\u003ccodeblock\u003e\u0026lt;pre\u0026gt;\u0026lt;code class=\"language-css\"\u0026gt;p { color: red }\u0026lt;/code\u0026gt;\u0026lt;/pre\u0026gt;\u003c/codeblock\u003e\n\u003cp\u003e If you use that pattern, the \u003ccodeph\u003e\u0026lt;pre\u0026gt;\u003c/codeph\u003e will automatically get the \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class (if it doesn’t already have it) and will be styled as a code block.\n\u003c/p\u003e\n  \u003cp\u003e If you want to prevent any elements from being automatically highlighted, you can use the attribute \u003ccodeph\u003edata-manual\u003c/codeph\u003e on the \u003ccodeph\u003e\u0026lt;script\u0026gt;\u003c/codeph\u003e element you used for prism and use the \u003cxref format=\"html\" scope=\"external\" href=\"https://prismjs.com/extending.html#api\"\u003eAPI\u003c/xref\u003e. Example:\n    \u003c/p\u003e\n\u003csection id=\"usage-with-webpack\"\u003e\u003ctitle\u003eUsage with Webpack, Browserify, \u0026amp; Other Bundlers\u003c/title\u003e\u003cp\u003eIf you want to use Prism with a bundler, install Prism with \u003ccodeph\u003enpm\u003c/codeph\u003e:\u003c/p\u003e\u003ccodeblock\u003e$ npm install prismjs\u003c/codeblock\u003e\u003cp\u003eYou can then \u003ccodeph outputclass=\"language-js\"\u003eimport\u003c/codeph\u003e into your bundle\u003c/p\u003e\u003ccodeblock outputclass=\"language-js\"\u003eimport Prism from 'prismjs';\u003c/codeblock\u003e\u003cp\u003eTo make it easy to configure your Prism instance with only thelanguages and plugins you need, use the babel plugin, \u003cxref format=\"html\" scope=\"external\" href=\"https://github.com/mAAdhaTTah/babel-plugin-prismjs\"\u003ebabel-plugin-prismjs\u003c/xref\u003e. This will allow you to load the minimum number of languages and plugins to satisfy your needs. See that plugin's documentation for configuration details\u003c/p\u003e\n\u003c/section\u003e\u003c/body\u003e\n\u003c/topic\u003e\n```\n\n### Formatted DITA\n\nAfter running `pretty-dita` the same file will have all its elements aligned, each block element on a new line and text\nshould not overrun the side of a typical view screen (approx 120 characters)\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE topic PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"topic.dtd\"\u003e\n\u003ctopic id=\"basic-usage\"\u003e\n    \u003ctitle\u003eBasic usage\u003c/title\u003e\n    \u003cbody outputclass=\"language-markup\"\u003e\n        \u003cp\u003e\n          You will need to include the \u003ccodeph\u003eprism.css\u003c/codeph\u003e and \u003ccodeph\u003eprism.js\u003c/codeph\u003e\n          files you downloaded in your page. Example:\n        \u003c/p\u003e\n        \u003ccodeblock\u003e\u0026lt;!DOCTYPE html\u0026gt;\n\u0026lt;html\u0026gt;\n\u0026lt;head\u0026gt;\n  ...\n  \u0026lt;link href=\"themes/prism.css\" rel=\"stylesheet\" /\u0026gt;\n  \u0026gt;\u0026lt;/head\u0026gt;\n\u0026lt;body\u0026gt;\n  ...\n  \u0026lt;script src=\"prism.js\"\u0026gt;\u0026lt;/script\u0026gt;\n  \u0026lt;/body\u0026gt;\n\u0026lt;/html\u0026gt;\u003c/codeblock\u003e\n        \u003cp\u003e\n          Prism does its best to encourage good authoring practices.  Therefore,it only\n          works with \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e elements,  since marking upcode\n          without a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e element is semantically invalid.\u003cxref\n          format=\"html\" scope=\"external\"\n          href=\"https://www.w3.org/TR/html52/textlevel-semantics.html#the-code-element\"\u003eAccording\n          to the HTML5 spec\u003c/xref\u003e, the recommended way to define a code language is a \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e\n          class, which is what Prism uses. Alternatively, Prism also supports a shorter version: \u003ccodeph\u003elang-xxxx\u003c/codeph\u003e.\n        \u003c/p\u003e\n        \u003cp\u003e\n          To make things easier however, Prism assumes that this language definition is\n          inherited. Therefore, if multiple \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e elements have\n          the same language, you can add the \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class on one\n          of their common ancestors. This way, you can also define a document-wide\n          default language, by adding a \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class on the \u003ccodeph\u003e\u0026lt;body\u0026gt;\u003c/codeph\u003e\n          or \u003ccodeph\u003e\u0026lt;html\u0026gt;\u003c/codeph\u003e element.\n        \u003c/p\u003e\n        \u003cp\u003e\n          If you want to opt-out of highlighting for a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e\n          element that is a descendant of an element with a declared code language, you\n          can add the class \u003ccodeph\u003elanguage-none\u003c/codeph\u003e to it (or any non-existing\n          language, really).\n        \u003c/p\u003e\n        \u003cp\u003e\n          The \u003cxref format=\"html\" scope=\"external\"\n          href=\"https://www.w3.org/TR/html5/grouping-content.html#the-pre-element\"\u003erecommended\n          way to mark up a code block\u003c/xref\u003e (both for semantics and for Prism) is a \u003ccodeph\u003e\u0026lt;pre\u0026gt;\u003c/codeph\u003e\n          element with a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e element inside, like so:\n        \u003c/p\u003e\n        \u003ccodeblock\u003e\u0026lt;pre\u0026gt;\u0026lt;code class=\"language-css\"\u0026gt;p { color: red }\u0026lt;/code\u0026gt;\u0026lt;/pre\u0026gt;\u003c/codeblock\u003e\n        \u003cp\u003e\n          If you use that pattern, the \u003ccodeph\u003e\u0026lt;pre\u0026gt;\u003c/codeph\u003e will automatically get\n          the \u003ccodeph\u003elanguage-xxxx\u003c/codeph\u003e class (if it doesn’t already have it) and\n          will be styled as a code block.\n        \u003c/p\u003e\n        \u003cp\u003e\n          If you want to prevent any elements from being automatically highlighted, you\n          can use the attribute \u003ccodeph\u003edata-manual\u003c/codeph\u003e on the \u003ccodeph\u003e\u0026lt;script\u0026gt;\u003c/codeph\u003e\n          element you used for prism and use the \u003cxref format=\"html\" scope=\"external\"\n          href=\"https://prismjs.com/extending.html#api\"\u003eAPI\u003c/xref\u003e. Example:\n        \u003c/p\u003e\n        \u003csection id=\"usage-with-webpack\"\u003e\n            \u003ctitle\u003eUsage with Webpack, Browserify, \u0026amp; Other Bundlers\u003c/title\u003e\n            \u003cp\u003e\n              If you want to use Prism with a bundler, install Prism with \u003ccodeph\u003enpm\u003c/codeph\u003e:\n            \u003c/p\u003e\n            \u003ccodeblock\u003e$ npm install prismjs\u003c/codeblock\u003e\n            \u003cp\u003e\n              You can then \u003ccodeph outputclass=\"language-js\"\u003eimport\u003c/codeph\u003e into your bundle\n            \u003c/p\u003e\n            \u003ccodeblock outputclass=\"language-js\"\u003eimport Prism from 'prismjs';\u003c/codeblock\u003e\n            \u003cp\u003e\n              To make it easy to configure your Prism instance with only thelanguages and\n              plugins you need, use the babel plugin, \u003cxref format=\"html\" scope=\"external\"\n              href=\"https://github.com/mAAdhaTTah/babel-plugin-prismjs\"\u003ebabel-plugin-prismjs\u003c/xref\u003e.\n              This will allow you to load the minimum number of languages and plugins to\n              satisfy your needs. See that plugin's documentation for configuration details\n            \u003c/p\u003e\n        \u003c/section\u003e\n    \u003c/body\u003e\n\u003c/topic\u003e\n```\n\n:arrow_forward: [Video from DITA-OT Day 2019](https://youtu.be/vobY_ha5nd0)\n\n[![](https://jason-fox.github.io/fox.jason.pretty-dita/javascript-video.png)](https://youtu.be/vobY_ha5nd0)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTable of Contents\u003c/strong\u003e\u003c/summary\u003e\n\n-   [Install](#install)\n    -   [Installing DITA-OT](#installing-dita-ot)\n    -   [Installing the Plug-in](#installing-the-plug-in)\n-   [Usage](#usage)\n    -   [Prettifying DITA files for a document](#prettifying-dita-files-for-a-document)\n    -   [Prettifying a single DITA file](#prettifying-a-single-dita-file)\n    -   [Parameter Reference](#parameter-reference)\n    -   [Ignoring DITA files](#ignoring-dita-files)\n-   [Formatting Rules](#formatting-rules)\n    -   [Basic Block Elements](#basic-block-elements)\n    -   [Indented Block Elements](#indented-block-elements)\n    -   [Inline Elements](#inline-elements)\n    -   [Text Elements](#text-elements)\n    -   [Whitespace sensitive elements](#whitespace-sensitive-elements)\n-   [Contribute](#contribute)\n-   [License](#license)\n\n\u003c/details\u003e\n\n## Install\n\nThe Pretty DITA for DITA-OT has been tested against [DITA-OT 4.x](http://www.dita-ot.org/download). It is recommended\nthat you upgrade to the latest version.\n\n### Installing DITA-OT\n\n\u003ca href=\"https://www.dita-ot.org\"\u003e\u003cimg src=\"https://www.dita-ot.org/images/dita-ot-logo.svg\" align=\"right\" height=\"55\"\u003e\u003c/a\u003e\n\nThe Pretty DITA for DITA-OT is a plug-in for the DITA Open Toolkit.\n\n-   Full installation instructions for downloading DITA-OT can be found\n    [here](https://www.dita-ot.org/4.0/topics/installing-client.html).\n\n    1.  Download the `dita-ot-4.2.zip` package from the project website at\n        [dita-ot.org/download](https://www.dita-ot.org/download)\n    2.  Extract the contents of the package to the directory where you want to install DITA-OT.\n    3.  **Optional**: Add the absolute path for the `bin` directory to the _PATH_ system variable. This defines the\n        necessary environment variable to run the `dita` command from the command line.\n\n```console\ncurl -LO https://github.com/dita-ot/dita-ot/releases/download/4.2/dita-ot-4.2.zip\nunzip -q dita-ot-4.2.zip\nrm dita-ot-4.2.zip\n```\n\n### Installing the Plug-in\n\n-   Run the plug-in installation command:\n\n```console\ndita install https://github.com/jason-fox/fox.jason.pretty-dita/archive/master.zip\n```\n\nThe `dita` command line tool requires no additional configuration.\n\n## Usage\n\nLike any other transform, when invoked directly, the prettier requires an input document\n\n### Prettifying DITA files for a document\n\nTo prettify DITA files for a document, use the `pretty-dita` transform, set the `--input` parameter to point to a\n`*.ditamap` file:\n\n```console\nPATH_TO_DITA_OT/bin/dita -f pretty-dita -i document.ditamap\n```\n\nAll `*.dita` and `*.ditamap` files **under that directory** will be updated in place.\n\n### Prettifying DITA files under a directory\n\nTo prettify DITA files within a directory, use the `pretty-dita` transform, set the `--input` parameter to point to the\ndirectory :\n\n```console\nPATH_TO_DITA_OT/bin/dita -f pretty-dita -i /path-to-directory\n```\n\nAll `*.dita` and `*.ditamap` files **under that directory** will be updated in place.\n\n### Prettifying a single DITA file\n\nAlternatively, to prettify a single DITA file, set the `--input` parameter to point to a `*.dita` file:\n\n```console\nPATH_TO_DITA_OT/bin/dita -f pretty-dita -i topic.dita\n```\n\nThe specified file will be updated in place.\n\n### Parameter Reference\n\n-   `args.indent` - How many characters to indent (default `4`)\n-   `args.style` - Whether to indent using tabs or spaces (default `spaces`)\n-   `args.print-width` - Specify the line length that the printer will wrap on (default `80`)\n-   `args.require-pragma` - Restrict the plug-in to only format files that contain a special comment, called a pragma,\n    at the top of the file (default `false`)\n\n    This is very useful when gradually transitioning large, unformatted codebases to pretty-dita.\n\n    For example, a file containing either of the following comments will be formatted when `args.require-pragma` is\n    supplied:\n\n```xml\n\u003c!-- @prettier --\u003e\n```\n\n```xml\n\u003c!-- @format --\u003e\n```\n\n-   `args.insert-pragma` - Insert a special `@format` marker at the top of files specifying that the file has been\n    formatted with the plugin (default `false`)\n\n### Ignoring DITA files\n\nThe prettifier will ignore any DITA file containing a comment starting `prettier-ignore` - the file will not be updated.\n\n```xml\n...\n\u003ctopic id=\"basic-usage\"\u003e\n    \u003c!-- prettier-ignore --\u003e\n    \u003ctitle\u003eBasic usage\u003c/title\u003e\n    \u003cbody outputclass=\"language-markup\"\u003e\n\u003clines\u003e\nThis file really doesn't need formatting\n    We want it to look this way.\n\u003c/lines\u003e\n        \u003cp\u003eThis will also be left alone.\u003c/p\u003e\n            \u003cp\u003eThis will be left as well\n        \u003c/p\u003e\n    \u003c/body\u003e\n\u003c/topic\u003e\n```\n\n## Formatting Rules\n\nThe pretty-dita DITA-OT Plug-in is an **opinionated** code formatter, DITA files are formatted to according to a\nwell-defined set of rules.\n\n### Basic Block Elements\n\nBy default all DITA elements (not listed in the categories below) are indented one level further than the containing\nDITA element\n\n#### Example\n\n```xml\n\u003ctopic id=\"basic-usage\"\u003e\n    \u003ctitle\u003eBasic usage\u003c/title\u003e\n    \u003cbody outputclass=\"language-markup\"\u003e\n        ...etc\n    \u003c/body\u003e\n\u003c/topic\u003e\n```\n\n### Indented Block Elements\n\nThe following elements frequently contain a large body of text within them. The opening and closing tags are therefore\nalways placed on a separate line before displaying the text found within them:\n\n-   Topic elements: `\u003cabstract\u003e`, `\u003cshortdesc\u003e`\n-   Body elements: `\u003cp\u003e`, `\u003cli\u003e`, `\u003cnote\u003e`, `\u003clq\u003e`\n\n#### Example\n\n```xml\n\u003cul\u003e\n    \u003cli\u003e\n      This is an item in an unordered list.\n    \u003c/li\u003e\n    \u003cli\u003e\n      To separate it from other items in the list, the formatter puts a bullet beside it.\n    \u003c/li\u003e\n    \u003cli\u003e\n      The following paragraph, contained in the list item element, is part of the list\n      item which contains it.\n        \u003cp\u003e\n          This is the contained paragraph.\n        \u003c/p\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      This is the last list item in our unordered list.\n    \u003c/li\u003e\n\u003c/ul\u003e\n```\n\n### Inline Elements\n\nThe following elements are treated as inline elements, they do not warrant an additional line and are kept within the\nsurrounding text\n\n-   Body elements: `\u003cph\u003e`, `\u003ccodeph\u003e`, `\u003csynph\u003e`, `\u003cterm\u003e`, `\u003cxref\u003e`, `\u003ccite\u003e`, `\u003cq\u003e`, `\u003cboolean\u003e`, `\u003cstate\u003e`, `\u003ckeyword\u003e`, `\u003coption\u003e`, `\u003ctm\u003e`,\n    `\u003cfn\u003e`, `\u003cxref\u003e`\n-   Programming elements: `\u003cparmname\u003e`, `\u003capiname\u003e`\n-   Typographic elements: `\u003cb\u003e`, `\u003ci\u003e`, `\u003csup\u003e`, `\u003csub\u003e`, `\u003ctt\u003e`, `\u003cu\u003e`\n-   Software elements: `\u003cfilepath\u003e`, `\u003cmsgph\u003e`, `\u003cuserinput\u003e`, `\u003csystemoutput\u003e`, `\u003ccmdname\u003e`, `\u003cmsgnum\u003e`, `\u003cvarname\u003e`\n-   Userinteface elements: `\u003cuicontrol\u003e`, `\u003cmenucascade\u003e`, `\u003cwintitle\u003e`\n-   XML Mention Domain: `\u003cnumcharref\u003e`, `\u003cparameterentity\u003e`, `\u003ctextentity\u003e`, `\u003cxmlatt\u003e`, `\u003cxmlelement\u003e`, `\u003cxmlnsname\u003e`, `\u003cxmlpi\u003e`\n\n#### Example\n\n```xml\n\u003cp\u003e\n  \u003cb\u003eSTOP!\u003c/b\u003e This is \u003cb\u003every\u003c/b\u003e important! Unplug the unit \u003ci\u003ebefore\u003c/i\u003e placing the\n  metal screwdriver against the terminal screw.\n\u003c/p\u003e\n```\n\n### Text Elements\n\nText elements on a single line are kept within the containing element Text element on multiple lines are indented one\nlevel further than the surrounding text. Long lines of text are truncated to approximately 80 characters length by\ndefault before adding a carriage return. Carriage returns are usually placed so as not to split inline elements, but\nthis is sometimes not feasable within the line limits, so a line break may occur before an inline attribute.\n\n#### Example\n\n```xml\n\u003cp\u003e\n  The \u003cxref format=\"html\" scope=\"external\"\n  href=\"https://www.w3.org/TR/html5/grouping-content.html#the-pre-element\"\u003erecommended\n  way to mark up a code block\u003c/xref\u003e (both for semantics and for Prism) is a \u003ccodeph\u003e\u0026lt;pre\u0026gt;\u003c/codeph\u003e\n  element with a \u003ccodeph\u003e\u0026lt;code\u0026gt;\u003c/codeph\u003e element inside, like so:\n\u003c/p\u003e\n```\n\n### Whitespace sensitive elements\n\nThe following elements are whitespace sensitive and require special processing:\n\n-   `\u003ccodeblock\u003e`, `\u003clines\u003e`, `\u003cmsgblock\u003e`, `\u003cpre\u003e`, `\u003cforeign\u003e`\n\nThe opening tag of a `\u003ccodeblock\u003e` is indented normally, the text within a `\u003ccodeblock\u003e` (if any) is not indented\n\n```xml\n\u003ctopic id=\"basic-usage\"\u003e\n    \u003ctitle\u003eBasic usage\u003c/title\u003e\n    \u003cbody outputclass=\"language-markup\"\u003e\n        \u003cp\u003e\n          You will need to include the \u003ccodeph\u003eprism.css\u003c/codeph\u003e and \u003ccodeph\u003eprism.js\u003c/codeph\u003e\n          files you downloaded in your page. Example:\n        \u003c/p\u003e\n        \u003ccodeblock\u003e\u0026lt;!DOCTYPE html\u0026gt;\n\u0026lt;html\u0026gt;\n\u0026lt;head\u0026gt;\n  ...\n  \u0026lt;link href=\"themes/prism.css\" rel=\"stylesheet\" /\u0026gt;\n  \u0026gt;\u0026lt;/head\u0026gt;\n\u0026lt;body\u0026gt;\n  ...\n  \u0026lt;script src=\"prism.js\"\u0026gt;\u0026lt;/script\u0026gt;\n  \u0026lt;/body\u0026gt;\n\u0026lt;/html\u0026gt;\u003c/codeblock\u003e\n        ...etc\n```\n\n`\u003ccodeblock\u003e` elements containing `\u003ccoderef\u003e` elements are indented as shown:\n\n```xml\n\u003ccodeblock outputclass=\"language-markup\"\u003e\n    \u003ccoderef href=\"../src/logo.svg\"/\u003e\n\u003c/codeblock\u003e\n```\n\nOther white-space sensitive elements such as `\u003clines\u003e` are supported in a similar manner. If processing is found to be\nincorrect due to embedded elements, it is suggested that the author uses the `pretty-ignore` directive to maintain\nwhitespace.\n\n## Contribute\n\nPRs accepted.\n\n## License\n\n[Apache 2.0](LICENSE) © 2019 - 2024 Jason Fox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-fox%2Ffox.jason.pretty-dita","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjason-fox%2Ffox.jason.pretty-dita","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-fox%2Ffox.jason.pretty-dita/lists"}