https://github.com/purplebooth/gfmfmt-action
Format your markdown into a standard format, and check PRs have markdown formatted in a standard way using pandoc
https://github.com/purplebooth/gfmfmt-action
Last synced: 5 months ago
JSON representation
Format your markdown into a standard format, and check PRs have markdown formatted in a standard way using pandoc
- Host: GitHub
- URL: https://github.com/purplebooth/gfmfmt-action
- Owner: PurpleBooth
- License: cc0-1.0
- Created: 2021-06-12T10:37:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T14:37:39.000Z (almost 2 years ago)
- Last Synced: 2025-08-19T21:54:13.350Z (11 months ago)
- Language: Shell
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# gfmfmt action
Format your markdown into a standard format, and check users have
formatted their markdown formatted uniformly using
[pandoc](https://pandoc.org/)
## A note on Markdown Flavours
While it may appear that Markdown is a single standard, that's not quite
true, there's lots of little extensions to it that make it not exactly
the same across the board. This is intended for use with "[GitHub
Flavoured
Markdown](https://docs.github.com/en/github/writing-on-github)". You can
read more about this on the [pandoc
docs](https://pandoc.org/MANUAL.html#markdown-variants).
The name comes from this fact: gfmfmt, GitHub Flavoured Markdown
Formatter.
## Inputs
### `check`
**Optional** Only check the markdown, don't fix it. Default `"true"`.
### `pattern`
**Optional** Pattern to filter files by. Default `".*\.md$"`.
## Example usage
### Checking all markdown files
``` yaml
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: PurpleBooth/gfmfmt-action@v2.0.14
```
### Checking some markdown files
``` yaml
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: PurpleBooth/gfmfmt-action@v1.0.3
with:
pattern: 'README.md$'
```
### Fixing all markdown files
``` yaml
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: PurpleBooth/gfmfmt-action@v1.0.3
with:
check: 'false'
- run: git add .
- run: git commit -m "Formatting markdown"
- run: git push
```
### Fixing some markdown files
``` yaml
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: PurpleBooth/gfmfmt-action@v1.0.3
with:
check: 'false'
pattern: 'README.md$'
- run: git add .
- run: git commit -m "Formatting markdown"
- run: git push
```
## Annotations
The annotations look like this

## CLI Tool
See [PurpleBooth/gfmfmt](https://github.com/PurpleBooth/gfmfmt)