hukkin / mdformat-shfmt

Mdformat plugin to format shell code blocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status PyPI version

mdformat-shfmt

Mdformat plugin to format shell code blocks

Description

mdformat-shfmt is an mdformat plugin that makes mdformat format shell code blocks embedded in Markdown with shfmt. The plugin invokes shfmt in a subprocess so having either shfmt or Docker installed is a requirement.

Installing

  1. Install either shfmt or Docker
  2. Install mdformat-shfmt
    pip install mdformat-shfmt

Usage

mdformat YOUR_MARKDOWN_FILE.md

Limitations

The Docker fallback is only tested on Linux. If you experience issues with it on Windows or macOS, please install shfmt.

About

Mdformat plugin to format shell code blocks

License:MIT License


Languages

Language:Python 100.0%