+
Skip to content

Ability to #include a file with all lines indented #68

Open
@computator

Description

@computator

I would like to be able to include one file inside another, but have the contents of the included file all indented by a certain amount. For example:

test.inc

multiline
example

test.yaml

example:
  content: |
    #include_indented test.inc
  other: asdf

Intended result:

example:
  content: |
    multiline
    example
  other: asdf

I am not sure if this is currently possible with gpp only? If so, I couldn't figure out how. Perhaps there's a way to use the output of include in a macro to then prefix all the lines with a string?

The only solution I could come up with so far is using exec, which I would prefer to avoid if possible.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载