https://github.com/aepfli/markdownlint-rule-github-admonition
https://github.com/aepfli/markdownlint-rule-github-admonition
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aepfli/markdownlint-rule-github-admonition
- Owner: aepfli
- License: mit
- Created: 2023-03-09T20:13:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-09T20:46:42.000Z (about 2 years ago)
- Last Synced: 2025-01-17T03:34:35.904Z (4 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# markdownlint-rule-github-admonition
Ensure proper GitHub admonition.
## Overview
Ensure nicely rendered Warnings and Notes for your markdown files.
## Installation
Use following command to install
```console
# TODO
npm install markdownlint-rule-github-admonition --save-dev
```## Configuration
Rulename: `github-admonition`
Tags: `admonition`
Parameters:
* `admonitions`: admonitions we should check for (`string[]`,
default `[ "Note", "Warning" ]`)
* `admonitionStart`: the usual starting string for admonition (`string`,
default `"> **"`)
* `admonitionEnd`: the usual ending string for admonition (`string`,
default `"**"`)Faulty:
```markdown
> **NOTE:** this will be detected{github-admonition}> **NOTE:**{github-admonition}
this will be detected> **NOTE:**{github-admonition}
> this will be detected**NOTE:** this will be detected{github-admonition}
**NOTE** this will be detected{github-admonition}
> **NOTE** this will be detected{github-admonition}
( **NOTE:** this will be detected){github-admonition}
(**NOTE:** this will be detected){github-admonition}
```Correct:
```markdown
> **Note** this is the correct syntax> **Note**
> this is the correct syntax
```### rendered comparison
**NOTE** this will be detected{github-admonition}
**NOTE this will be detected{github-admonition}**
> **NOTE** this will be detected{github-admonition}
( **NOTE:** this will be detected){github-admonition}
> **Note** this is the correct syntax
## Usage
For usage with certain tools,
please refer to the documentation of [markdownlint](https://github.com/davidAnson/markdownlint),
markdownlint-cli or the tool you are planning to use.