Skip to main content

A GitHub Flavored Markdown compliant Markdown linter.

Project description

PyMarkdown

Project Version Python Versions platforms License GitHub top language
Quality GitHub Workflow Status (event) Issues codecov Sourcery snyk
GitHub Pipenv locked dependency version (branch) GitHub Pipenv locked dependency version (branch) GitHub Pipenv locked dependency version (branch) GitHub Pipenv locked dependency version (branch) GitHub Pipenv locked dependency version (branch) GitHub Pipenv locked dependency version (branch) GitHub Pipenv locked dependency version (branch)
Community Maintenance Stars Forks Contributors Downloads
Maintainers LinkedIn

What Is PyMarkdown?

PyMarkdown is primarily a Markdown linter. To ensure that the Markdown linting is conducted with the highest attention to detail, our linting rules analyze the tokens produced by the project's own Markdown parser. The project's Markdown parser aims to be highly compliant to both the GitHub Flavored Markdown specification and the CommonMark specification. This is important as we estimate that over 90% of the existing parsers are mostly compliant to one of those two specifications. By our parser adhering to those specifications, we have a high degree of confidence that the rules we have written are based on solid information about the structure of the Markdown documents that they are evaluating. Since the rules have precise information on how compliant parsers view the structure of a given Markdown document, each rule can make the best decision possible on whether it should trigger a failure or not.

Why Should I Use PyMarkdown?

We go into this in more detail in our project documentation, but here is the short version.

Do you use spell checkers and grammer checkers for your emails, instant messages, and documents?

Do you use static code analysis tools to verify that you are committing your best source code to your projects?

Do you want to be able to customize your guidelines on a per-project basis with little effort?

If the answer to any of those questions is "Yes", then we encourage you to consider using our PyMarkdown linter to check you Markdown documents against a configurable set of rules that you specify. We start you off with a common set of rules and configuration settings, but you are able to enable, disable, and configure rules to correspond to what you want the Markdown guidelines to be for your project.

What Advantages Does PyMarkdown Have Over Other Markdown Linters?

The PyMarkdown project has the following advantages:

What Are The Minimum Requirements?

This project required Python 3.10 or later to function.

What Linting Checks Does PyMarkdown Release With?

The PyMarkdown project is released with 46 out-of-the-box rules to check your Markdown with. Roughly 44 of those rules are our version of the rules provided by the Markdown Lint project. We purposefully made the decision to implement those rules as they are somewhat of a standard due to Markdown Lint being a plugin for VSCode.

The reason that we state "our version of the rules" is because we believe that some of the rules are either overly complicated or were not catching all use cases properly. Our philosophy is that each Plugin Rule should perform one check and one check only... no side-effect checks. We also believe that some of the Markdown Lint rules do not understand the context of the document properly, leading to misses for their rules. Our architecture was created to ensure that we always have access to the context of any Markdown element that was scanned.

Basically, we want to support the worldwide users of Markdown by enabling PyMarkdown to have the best rules possible. And to do this on the behalf of our users, we feel that we need to make our own decisions on what a rule is.

How Do I Run This Tool?

The PyMarkdown application is primarily a command line tool for linting, so many features boil down to expressing them in the form of commands.

However, we also expose the following other ways to execute the PyMarkdown application:

For more information on the Pymarkdown application and its command lines, please look here.

What If It Is Missing A Feature That I Am Looking For?

Our project team is very open to discussing any features that you would like to see in this project. The two most frequent requests we get are to extend our Markdown parser to include a new extension or to extend our our Rule Engine to support a new rule or a variation of an existing rule.

Extending our Markdown parser to accomodate widely supported Markdown elements is one of the goals of our project. However, implementing an extension takes time, especially when it comes to testing the extension. When we start working on an extension, we usually forecast a 1-3 month window for the extension, with subreleases along the way for people to try out.

Extending our Rule Engine to support new rules is built in to the foundation of the Rule Engine itself with our Rule Plugins. Most of the time, we are able to work on those in parallel with other work and other testing, so that helps out as well. But they still take time. With the addition of our new Fix Mode, adding the ability to automatically fix any issues takes even longer to complete properly.

Neither of the last two paragraphs should be considered negative in the least. We are just trying to explain that new features take time and why they take time. The good news is that we are in the process of documenting the Rule Plugin creation process to the point where other people can work on them and submit them for consideration. Look out for that in the near future!

Where Can I Find More Detailed Information About PyMarkdown?

Our documentation is hosted at ReadTheDocs and is kept up-to-date.

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

pymarkdownlnt-0.9.35.tar.gz (428.5 kB view details)

Uploaded Source

Built Distribution

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

pymarkdownlnt-0.9.35-py3-none-any.whl (508.4 kB view details)

Uploaded Python 3

File details

Details for the file pymarkdownlnt-0.9.35.tar.gz.

File metadata

  • Download URL: pymarkdownlnt-0.9.35.tar.gz
  • Upload date:
  • Size: 428.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pymarkdownlnt-0.9.35.tar.gz
Algorithm Hash digest
SHA256 89529c9bbd3fc4258b2bf4652a07e98093ee665f5abadccc7d1a7a36b92e2c4d
MD5 6dbf1c3168de0e1fd0cd8e422f73b403
BLAKE2b-256 ec08f7ef72181e8e32016a037beae5bde01f900dba28c2c3b7613149b0f56e04

See more details on using hashes here.

File details

Details for the file pymarkdownlnt-0.9.35-py3-none-any.whl.

File metadata

  • Download URL: pymarkdownlnt-0.9.35-py3-none-any.whl
  • Upload date:
  • Size: 508.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pymarkdownlnt-0.9.35-py3-none-any.whl
Algorithm Hash digest
SHA256 c71b100cc662d766ab2bb8fbb01dfce4e0410797c450b4cc884cc63162cb83e7
MD5 97d2ee5a38d79ce9cf4a96f9f0a0cb0f
BLAKE2b-256 4cf44957bc018cee3f7a0333540e4de6dd14bca219d19fa4078d252ddf80a604

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