Metadata-Version: 2.1
Name: mdformat-beautysh
Version: 0.1.0
Summary: Mdformat plugin to beautify Bash scripts
Home-page: https://github.com/hukkinj1/mdformat-beautysh
License: MIT
Keywords: mdformat,beautysh,bash,markdown,commonmark,formatter
Author: Taneli Hukkinen
Author-email: hukkinj1@users.noreply.github.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Documentation
Classifier: Topic :: Text Processing :: Markup
Requires-Dist: beautysh (>=6.0.0)
Requires-Dist: mdformat (>=0.1.2)
Project-URL: Repository, https://github.com/hukkinj1/mdformat-beautysh
Description-Content-Type: text/markdown

[![Build Status](https://github.com/hukkinj1/mdformat-beautysh/workflows/Tests/badge.svg?branch=master)](<https://github.com/hukkinj1/mdformat-beautysh/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush>)
[![PyPI version](https://badge.fury.io/py/mdformat-beautysh.svg)](<https://badge.fury.io/py/mdformat-beautysh>)

# mdformat-beautysh
> Mdformat plugin to beautify Bash scripts

## Description
mdformat-beautysh is an [mdformat](https://github.com/executablebooks/mdformat) plugin
that makes mdformat format Bash scripts with [Beautysh](https://github.com/lovesegfault/beautysh).
## Usage
Install with:
```console
pip install mdformat-beautysh
```

When using mdformat on the command line, Beautysh formatting will be automatically enabled after install.

When using mdformat Python API, code formatting for Bash scripts will have to be enabled explicitly:
```python
import mdformat


unformatted = """~~~bash
function bad_func()
 {
echo "test"
}
~~~
"""

formatted = mdformat.text(unformatted, codeformatters={"bash", "sh"})

assert formatted == """~~~bash
function bad_func()
{
    echo "test"
}
~~~
"""
```

