-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add CHANGES_AST
switch to plugin API so that AST breaking plugins can disable the equality check
#49
Conversation
…an disable the equality check
Codecov Report
@@ Coverage Diff @@
## master #49 +/- ##
==========================================
+ Coverage 96.53% 97.01% +0.47%
==========================================
Files 9 9
Lines 462 469 +7
==========================================
+ Hits 446 455 +9
+ Misses 16 14 -2
Continue to review full report at Codecov.
|
Ping @chrisjsewell you might wanna have a look at this one? |
Heya, can we make this a core CLI option? i.e. rather than hard-code the initial value of parser.add_argument(
"--skip-validation", action="store_true", help="Do not ensure the output Markdown produces the same HTML.")
...
changes_ast = args.skip_validation This would be very useful for debugging issues. You could even call the option something like |
Sure, I made an issue #50 I'm not a huge fan of adding functionality for developers in general (the tool is intended for users), but I think this could be possibly be useful for users as well. |
You realise this is to help you out as well. The rest of that error message reads:
So basically, anytime a plugin has a bug like this, there is going to be a bunch of people opening an issue here, quoting this message, and you will have no easy way to debug it. |
Sure thing, but if they can provide the input, it should be very simple to reproduce (might be a good idea to add a note about that in that print). |
Well sure you will be able to reproduce the error message, how is that going to help you debug it? Comparing to black: that provides the actual diff in the error message: https://github.com/psf/black/blob/283d999c3f89e2204cbf5a61242665bedd6887ef/src/black/__init__.py#L6258-L6260, and also provides the |
With a debugger 😄
Yeah adding the diff would be even better. |
Btw, totally unrelated, lol, but I got a first working build of the toc generator plugin https://github.com/hukkinj1/mdformat-toc Tried it out on the README here https://github.com/hukkinj1/typenv and seems to be working fine, though I don't fully trust it yet (enough to add a link on mdformat README for instance). 😄 Thought you might be interested |
yeh looks good 👍 The key part of this though is the slugify function, which is unfortunately not standardised across all renderers. As suggested before, It would be ideal to either integrate this with: Examples of integration with markdown-it-anchor are https://www.npmjs.com/package/markdown-it-table-of-contents and https://www.npmjs.com/package/markdown-it-toc-done-right |
No description provided.