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

Add --fast flag to skip Markdown validation #50

Closed
hukkin opened this issue Oct 3, 2020 · 5 comments · Fixed by #496
Closed

Add --fast flag to skip Markdown validation #50

hukkin opened this issue Oct 3, 2020 · 5 comments · Fixed by #496
Labels
enhancement New feature or request

Comments

@hukkin
Copy link
Owner

hukkin commented Oct 3, 2020

See #49 (comment)

Add a CLI flag for skipping Markdown validation.
I would name the flag --fast, --unsafe or --skip-validation.

@KyleKing
Copy link
Contributor

Do you have a preference for which flag to add? I may have time to submit a PR by next week?

@hukkin
Copy link
Owner Author

hukkin commented Oct 30, 2024

I think --unsafe and --skip-validation are both alright.

I always thought if things are eventually stable for years, it may be possible to change the default value of this check to off. If that happens we need the opposite flag. Then we'd have either --safe or --no-skip-validation out of which --safe seems much better. But that'd translate to safe = true/false in TOML which with --unsafe would slightly break the rule where CLI opt naming directly corresponds with TOML attribute naming....

Would --no-validate and validate = false/true be horrible? 😄 Either that or just --unsafe and unsafe = true/false, and don't worry about the future. Whoever implements can decide 😄

@KyleKing
Copy link
Contributor

KyleKing commented Oct 30, 2024

I like --no-validate, but I would probably prefer to default to validate = true because plugins often break the AST (or maybe that's just me 😆 https://github.com/search?q=org%3AKyleKing+renders+to+different+HTML&type=issues)

@hukkin
Copy link
Owner Author

hukkin commented Oct 30, 2024

I would probably prefer to default to validate = true

Yeah right now the default must definitely not change. And if it ever changes it may be useful for experimental plugins to be able to keep the validation on, similar to how they can turn validation off via CHANGES_AST already.

KyleKing added a commit to KyleKing/mdformat that referenced this issue Dec 17, 2024
KyleKing added a commit to KyleKing/mdformat that referenced this issue Dec 17, 2024
hukkin added a commit that referenced this issue Dec 19, 2024
* fix(#50): add --no-validate

* refactor: use `dest=validate`

Co-authored-by: Taneli Hukkinen <[email protected]>

* refactor: finish renaming the stored value to validate

* test: add patch to unit test

* docs: add 'validate' to documentation

* docs: re-generate help on Python 3.13.1

* test: add valid configuration test

* fix: allow override

* Apply suggestions from code review

Co-authored-by: Taneli Hukkinen <[email protected]>

* ci: apply formatting

---------

Co-authored-by: Taneli Hukkinen <[email protected]>
@hukkin
Copy link
Owner Author

hukkin commented Dec 19, 2024

Closed by #496

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

Successfully merging a pull request may close this issue.

2 participants