-
-
Notifications
You must be signed in to change notification settings - Fork 41
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 support for on/off comments #287
base: main
Are you sure you want to change the base?
Conversation
Not sure yet how you'd like to add support for rST and Latex. rST comments would look like this: ..
blacken-docs:off
.. code-block:: python
f(1,2,3)
..
blacken-docs:on And Latex ones like this: % blacken-docs:off
\begin{minted}{python}
f(1,2,3)
\end{minted}
% blacken-docs:on Should we extend the comment regex to match all three kinds of comments regardless of the source file type? |
for more information, see https://pre-commit.ci
OK we now have a single regex for the three syntax, and tests for each. |
…o on-off-comments
for more information, see https://pre-commit.ci
…o on-off-comments
for more information, see https://pre-commit.ci
Pre-commit doesn't use the modified code, therefore my examples in the README got formatted 😅 |
Also note sure how to cover line 120. |
@adamchainz gentle ping 🙂 |
@adamchainz is it OK if I ping you from time to time? That's what I ask from others when I don't answer, but you might work differently, and I don't want to bother you 🙂 |
Please don’t ping |
Waiting for adamchainz/blacken-docs#287 to be reviewed/merged.
I stopped using blacken-docs some time ago, so I'll close this PR, but feel free to reopen it if you or other users are still interested in getting it merged 🙂 |
I still intend to add this |
Closes #193