-
Notifications
You must be signed in to change notification settings - Fork 17
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
Comments
Honest question: I think this suggestion has merit. Would it be useful to have a "mirror" rule that would only work inside of code blocks and/or inline code? Based on the reading of your statement, it seems like it would also be useful to have "django" be on a list, possibly with some rules saying when it should be "django" and when "Django". Thoughts? |
Thanks for the response! I do think it'd be interesting to have a similar rule within code blocks/inline code, let's call it MD0xx for the sake of example. I don't know that there's necessarily a direct mapping from one to the other, so they'd probably still need to be separate config settings. MD044 (non-code) config could include:
MD0xx (code) config could include:
However I personally think that MD0xx would be a lower priority to implement than the enhancement to MD044 described above - at least from my personal perspective as primarily a coder rather than a docs-writer, I'm much more likely to get the capitalization "correct" in code references than I am in free-text documentation. :-) |
completed, will be in the next release. |
just published a new release. can you verify if this is working as intended? |
Looks like it works great! Thanks! |
Prerequisites
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
- perhapsinline_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:Or, for
PyMarkdown
itself: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.
The text was updated successfully, but these errors were encountered: