1.6.0 • Published 12 days ago

markdown-table-formatter v1.6.0

Weekly downloads
111
License
MIT
Repository
github
Last release
12 days ago

Markdown table formatter

Version Downloads/week Downloads/total Mega-Linter codecov GitHub contributors GitHub stars License PRs Welcome

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

Banner

Table of contents

Installation

Local

npm install markdown-table-formatter --save

Global

npm install markdown-table-formatter -g

Usage

markdown-table-formatter [OPTIONS] (file(s) or glob expression)

Options

ParameterDescriptionDefault value
-c--checkCheck only, does not update filesfalse
-p--columnpaddingOverride column padding number of spaces
-h--helpDisplays help
-v--versionDisplays version

Examples

Format all markdown files found within current directory

markdown-table-formatter

Format all markdown files found with a glob expression

markdown-table-formatter **/docs/*.md

Format markdown tables in a single file

markdown-table-formatter myfile.md

Format markdown tables in a multiple file

markdown-table-formatter myfile.md anotherFile.md andAnotherFile.md

Check if markdown table formatting is necessary in a single file

markdown-table-formatter --check myfile.md

Check if markdown table formatting is necessary in a multiple files

markdown-table-formatter --check myfile.md anotherFile.md andAnotherFile.md

You can see more examples in test methods

Continuous Integration

You can automatically check markdown tables formatting and fix it using MegaLinter, that embeds markdown-table-formatter out of the box

Ignoring Code Blocks

You may wish to ignore specific markdown content, especially when using with Megalinter or terraform-docs

To achieve this, place tags <!-- markdown-table-prettify-ignore-start --> and <!-- markdown-table-prettify-ignore-end --> around the content you want markdown-table-formatter to ignore.

Contribute

Contributions are very welcome !

Please follow Contribution instructions

Release Notes

See complete CHANGELOG

1.6.0

12 days ago

1.5.0

6 months ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago