Skip to content

Rule MD044 - option to skip over inline code references #1277

@glennmatthews

Description

@glennmatthews

Prerequisites

  • Are you running the latest version of this application?
  • Have you checked the Frequently Asked Questions document?
  • Did you perform a cursory search of other issues to look for related issues?

Feature Request

Description

In addition to the current feature of being able to skip MD044 (proper-names) enforcement in standalone code blocks, it would be very useful to also have an option to disable its enforcement in inline code (i.e. delimited by backticks). This would allow for common documentation patterns like references to Python modules and packages by their literal names without this being flagged as an error.

Desired Behavior of Feature

A new boolean configuration knob in rule MD044, similar to code_blocks - perhaps inline_code? This knob would default to True, in which case the current rule behavior would remain. However, when set to False, the rule would skip over any text marked as inline code, and not check such text for proper-name validity.

For example when referencing Django code we could add Django as a proper name and still have the below be considered valid:

To write unit tests in Django, you should import `TestCase` from `django.test` instead of from `unittest`.

Or, for PyMarkdown itself:

PyMarkdown is implemented in the `pymarkdown` Python module.

What Are the Benefits of This Feature?

Currently I'm hard-pressed to consider adding names in my MD044 configuration because nearly every proper noun I'd like to reference in my documentation has one proper-name form when writing colloquially and a different, usually all-lower-case, form when referenced as code. I'd have to add a tremendous number of pragma statements in my documentation to account for this.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions