GithubHelp home page GithubHelp logo

mdformat-simple-breaks's Introduction

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, 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.

mdformat-simple-breaks's People

Contributors

csala avatar

Stargazers

 avatar  avatar

Watchers

 avatar

mdformat-simple-breaks's Issues

Make thematic breaks configurable

Add 2 CLI and .mdformat.toml options to control how the thematic breaks are rendered:

  • thematic_breaks_character
  • thematic_breaks_length

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.