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

Error: "markflow.exceptions.ReformatInconsistentException: Reformat of reformatted code results in different text." #66

Open
hannob opened this issue Jul 4, 2023 · 0 comments

Comments

@hannob
Copy link

hannob commented Jul 4, 2023

With a relatively simple text file I get an exception with markflow.

This is the input:

The history of carbon capture took a new turn with the Sleipner project in Norway. The
Nordic country was among the first to implement a carbon tax in 1991. It gave companies
a financial incentive to reduce their carbon dioxide emissions.

When I use markflow with a line length of 78, it breaks:

markflow --line-length 78 ccs.md
  File "/home/hanno/.local/bin/markflow", line 8, in <module>
    sys.exit(__main__())
             ^^^^^^^^^^
  File "/home/hanno/.local/lib/python3.11/site-packages/markflow/__main__.py", line 382, in __main__
    exit(main(sys.argv[1:]))
         ^^^^^^^^^^^^^^^^^^
  File "/home/hanno/.local/lib/python3.11/site-packages/markflow/__main__.py", line 377, in main
    return _reformat_files(args)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/hanno/.local/lib/python3.11/site-packages/markflow/__main__.py", line 282, in _reformat_files
    new_contents = reformat_markdown_text(old_contents, args.line_length)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hanno/.local/lib/python3.11/site-packages/markflow/reformat_markdown.py", line 97, in reformat_markdown_text
    raise ReformatInconsistentException(
markflow.exceptions.ReformatInconsistentException: Reformat of reformatted code results in different text. Please open a bug report or email [email protected]. (file: ccs.md)
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

1 participant