Skip to main content

An mdformat plugin for simple line breaks like in GitHub Flavored Markdown.

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: 1.0.0  # 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, and therefore this likely to be the format which Markdown writers are most used to type.

On the other hand, plain mdformat renders these thematic breaks 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 offer the option to render the thematic breaks using the common three dash style when preferred.

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.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdformat_simple_breaks-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdformat_simple_breaks-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for mdformat_simple_breaks-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f1d57edba17d6ca7175031a3f2edb2e69ea5800c7c406c905e81e75a325470d
MD5 207090241c0c959a811652ea27b3a857
BLAKE2b-256 97cf21faa8db8ac7548fc58424a82a48b4e6c53dcd45d4cf86494586e8eb4329

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdformat_simple_breaks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c81c3d2ee65f0a0d9a968fb02347d1d34a14a6b0f3655c01e2a05bba10e8211f
MD5 c33ccee7eda0c3e5014094d376a188ae
BLAKE2b-256 c161ae77d87133bd32c86631dcfb595a24432cec45d868c99b7e9b6b50597bf0

See more details on using hashes here.

Supported by

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