https://github.com/hildjj/dentin
(in)dent XML and HTML
https://github.com/hildjj/dentin
Last synced: 2 months ago
JSON representation
(in)dent XML and HTML
- Host: GitHub
- URL: https://github.com/hildjj/dentin
- Owner: hildjj
- License: bsd-2-clause
- Created: 2015-04-08T14:26:51.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T17:41:51.000Z (over 2 years ago)
- Last Synced: 2025-03-13T07:17:49.473Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 601 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
(In)dent XML and HTML
=====================All of the pretty-printers I found for XML and HTML didn't work well enough, so
I spent way too much time putting this together. It handles DTDs, mixed content,
etc. in the way that I prefer. File bugs if you disagree and I'll likely add
config options.Installation
------------npm install -g dentin
Usage
-----dentin [files...]
Indent XML or HTML files
Positionals:
files The files to read. To read stdin explicitly, use "-". [default: stdin]Options:
-i, --ignore Ignore elements with these names, do not word-wrap them
[array]
-o, --output Output file name [string] [default: stdout]
-b, --backup Replace the current file, keeping a backup of the original,
with the given extension. This can be used to process
several files at once into different output files. [string]
-c, --config Read configuration information from this JSON file.
[default: ".dentin.json"]
-d, --doubleQuote Use double quotes for attributes [boolean] [default: false]
-m, --margin Line length for word wrapping [number] [default: 78]
-s, --spaces How many spaces to indent each level. 0 causes left
alignment. -1 strips insignificant whitespace.
[number] [default: 2]
-n, --noVersion Do not output the XML version or HTML doctype prefix
[boolean] [default: false]
--html Process these files as HTML instead of XML
[boolean] [default: determine from file name]
-Q, --fewerQuotes In HTML docs, only use quotes around attribute values that
require them [boolean] [default: false]
-h, --help Show help [boolean]
-V, --version Show version number [boolean][](https://github.com/hildjj/dentin/actions/workflows/node.js.yml)
[](https://codecov.io/gh/hildjj/dentin)