Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
glennmatthews opened this issue Dec 6, 2024 · 0 comments
Open
3 tasks done

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

glennmatthews opened this issue Dec 6, 2024 · 0 comments

Comments

@glennmatthews
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant