Skip to content

Triple quotes escaping #13

@The-city-not-present

Description

@The-city-not-present

I believe triple quotes escaping is wrong. I suggest this change: in process_files, where we start the block with injected modules, instead of output(cfg, "'''"), add output(cfg, "r'''"). Explanation: if we don't add "r", the string is considered to be a python string, and backslashes mean that some characters should be changed to their code. Like, the syntax includes \t and it is changed to a tab character within the string, but it should not be changed! Backslash is a part of code, it should still be a backslash and a t. Converting the string to a raw string (started with r''') we meet or goal. So, in the output, in the bundle, we add on single chatacter, "r" before "'''".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions