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

Breaks on hard tab indents in rST #138

Closed
auscompgeek opened this issue Jan 15, 2022 · 1 comment
Closed

Breaks on hard tab indents in rST #138

auscompgeek opened this issue Jan 15, 2022 · 1 comment

Comments

@auscompgeek
Copy link

reStructuredText allows for using tabs for indenting code-blocks.

Traceback (most recent call last):
  File "~/.local/bin/blacken-docs", line 8, in <module>
    sys.exit(main())
  File "~/.local/lib/python3.10/site-packages/blacken_docs.py", line 246, in main
    retv |= format_file(filename, black_mode, skip_errors=args.skip_errors)
  File "~/.local/lib/python3.10/site-packages/blacken_docs.py", line 202, in format_file
    new_contents, errors = format_str(contents, black_mode)
  File "~/.local/lib/python3.10/site-packages/blacken_docs.py", line 189, in format_str
    src = RST_RE.sub(_rst_match, src)
  File "~/.local/lib/python3.10/site-packages/blacken_docs.py", line 109, in _rst_match
    min_indent = min(INDENT_RE.findall(match['code']))
ValueError: min() arg is an empty sequence
@asottile
Copy link
Contributor

dupe #108

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

No branches or pull requests

2 participants