You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ blacken-docs t.rstTraceback (most recent call last): File "/tmp/c/venv/bin/blacken-docs", line 8, in <module> sys.exit(main()) File "/tmp/c/venv/lib/python3.8/site-packages/blacken_docs.py", line 210, in main retv |= format_file(filename, black_mode, skip_errors=args.skip_errors) File "/tmp/c/venv/lib/python3.8/site-packages/blacken_docs.py", line 166, in format_file new_contents, errors = format_str(contents, black_mode) File "/tmp/c/venv/lib/python3.8/site-packages/blacken_docs.py", line 155, in format_str src = RST_PYCON_RE.sub(_rst_pycon_match, src) File "/tmp/c/venv/lib/python3.8/site-packages/blacken_docs.py", line 131, in _rst_pycon_match assert fragment is not NoneAssertionError
.. code-block:: pycon >>> 1/0 Traceback (most recent call last): ... ZeroDivisionError: division by zero
https://github.com/asottile/blacken-docs/blob/master/blacken_docs.py#L130-L134
I think this could just translate to
if continuation_match and fragment is not None:
so that...
lines in output are not treated as continuations.The text was updated successfully, but these errors were encountered: