Skip to main content

An mdformat plugin for...

Project description

mdformat-simple-breaks

Build Status codecov.io PyPI version

An mdformat plugin to render thematic breaks using three dashes instead of 70 underscores.

Install

Install with:

pip install mdformat-simple-breaks

Usage as a pre-commit hook

Add the following to your .pre-commit-config.yaml:

- repo: https://github.com/executablebooks/mdformat
  rev: 0.7.13  # Use the ref you want to point at
  hooks:
    - id: mdformat
      additional_dependencies:
        - mdformat-simple-breaks

Plugin rationale

The CommonMark specification states that thematic breaks, which are to be rendered as horizontal rules <hr>, should be coded as:

A line consisting of optionally up to three spaces of indentation, followed by a sequence of three or more matching -, _, or * characters, each followed optionally by any number of spaces or tabs

As a result, most of the Markdown guides and cheat sheets show a line made of three dash symbols as an example of a thematic break:

---

On the other hand, mdformat renders these thematics breaks by default as a line of 70 consecutive underscore characters:

________________________________________________________________________________

This is an explicit style decision that is not going to be reverted and for which no configuration will be added.

As a result, this plugin has been created to override that decision and go back to the three - thematic breaks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdformat_simple_breaks-0.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

mdformat_simple_breaks-0.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file mdformat_simple_breaks-0.0.1.tar.gz.

File metadata

File hashes

Hashes for mdformat_simple_breaks-0.0.1.tar.gz
Algorithm Hash digest
SHA256 36dbd4981e177526c08cfd9b36272dd2caf230d7a2c2834c852e57a1649f676a
MD5 aa526ad4f7ead6d9153946c9f647f69f
BLAKE2b-256 62af5b88367b69084c8bc60cfc4103eb62482655f8dbbb6dc81431aa27455b22

See more details on using hashes here.

File details

Details for the file mdformat_simple_breaks-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mdformat_simple_breaks-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3dde7209d509620fdd2bf11e780ae32d5f61a80ea145a598252e2703f8571407
MD5 172f9bb7298ebb0e05ece35760dc6f03
BLAKE2b-256 201d8e992c96d7ac86f85e1b4094d3887658376443b56679b834de8b23f4f849

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page