Skip to content

Code generator: Handle mixed indents #1

@coderbloke

Description

@coderbloke
  • Somewhere should be able to define tab width in spaces
    It's crucial for the code provider context. That is depending on the code style of whom made it, and cannot be identified automatically.
    For the output format, it1s also needed, but not so crucial.
  • Ident type from template can be identified. Check last character before a template tag.
    If space = use space ident in subtitution, if tab = use tab ident
  • Ident of template before tag shall be kept as is (no matter if it is mixed)
  • When code provider returns a code snippet, all lines shall be processed in advance to collect all ident levels. Put them in order and make +/- 1 ident level between them in the output.
    No matter if tab and spaces are mixed. All shall be substituted with the ident mode coming from the template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions