Format markdown tables in files
npm install markdown-table-formatter









Format markdown tables in files, using embedded markdown-table-prettify

- Installation
- Local
- Global
- Usage
- Options
- Examples
- Continuous Integration
- Ignoring Code Blocks
- Contribute
- Release notes
``shell`
npm install markdown-table-formatter --save
`shell`
npm install markdown-table-formatter -g
`shell`
markdown-table-formatter [OPTIONS] (file(s) or glob expression)
| Parameter | Description | Default value |
|----------------|-----------------------------------|---------------|
| -c
--check | Check only, does not update files | false |
| -p
--columnpadding | Override column padding number of spaces |
| -h
--help | Displays help | |
| -v
--version | Displays version | |
Format all markdown files found within current directory
`shell`
markdown-table-formatter
Format all markdown files found with a glob expression
`shell`
markdown-table-formatter */docs/.md
Format markdown tables in a single file
`shell`
markdown-table-formatter myfile.md
Format markdown tables in a multiple file
`shell`
markdown-table-formatter myfile.md anotherFile.md andAnotherFile.md
Check if markdown table formatting is necessary in a single file
`shell`
markdown-table-formatter --check myfile.md
Check if markdown table formatting is necessary in a multiple files
`shell`
markdown-table-formatter --check myfile.md anotherFile.md andAnotherFile.md
You can see more examples in test methods
You can automatically check markdown tables formatting and fix it using MegaLinter, that embeds markdown-table-formatter out of the box
You may wish to ignore specific markdown content, especially when using with Megalinter or terraform-docs
To achieve this, place tags and ` around the content you want markdown-table-formatter to ignore.
Contributions are very welcome !
Please follow Contribution instructions
See complete CHANGELOG