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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docformatter 1.7.5 improperly breaks on emoji/formatted multiline string #282

Open
hemanthkini opened this issue Jun 11, 2024 · 0 comments
Labels
fresh This is a new issue

Comments

@hemanthkini
Copy link

Running docformatter 1.7.5 with Python 3.12.4 against this test file:

def test(test_arg1):
    content = f"""
    <table style="width: 100%; height: 100%; font-size: 1.1em;">
        <tr>
            <td style="width: 100%; height: 100%;">馃敆 This is a test {test_arg1} </td>
        </tr>
    </table>
    """
    return content

improperly returns:

--- before/test.py
+++ after/test.py
@@ -2,7 +2,7 @@
     content = f"""
     <table style="width: 100%; height: 100%; font-size: 1.1em;">
         <tr>
-            <td style="width: 100%; height: 100%;">馃敆 This is a test {test_arg1} </td>
+            <td style="width: 100%; height: 100%;">馃敆 This is a test {te{test_arg1} </td>
         </tr>
     </table>
     """

This used to work with Python 3.12.2 - I suspect it's a combination of the use of an emoji, the variable within the curly brace, and some change in the tokenizer/untokenizer logic.

@github-actions github-actions bot added the fresh This is a new issue label Jun 11, 2024
@hemanthkini hemanthkini changed the title docformatter improperly breaks on docformatter 1.7.5 improperly breaks on emoji/formatted multiline string Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fresh This is a new issue
Projects
None yet
Development

No branches or pull requests

1 participant