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

Indentation problem #992

Open
davidebettio opened this issue Sep 19, 2023 · 1 comment
Open

Indentation problem #992

davidebettio opened this issue Sep 19, 2023 · 1 comment

Comments

@davidebettio
Copy link

Hi,

how could I indent in this way?

DNAT:
- DST_DEV: GREEN&ORANGE&BLUE
  DST_IP: 192.168.0.10
  DST_PORT: '8080'
  ENABLED: 'on'
  FILTER_TARGET: ALLOW
  LOG: 'off'
  NAT_TARGET: DNAT
  PROTO: tcp
  REMARK: test1
  SRC_DEV: ''
  SRC_IP: 127.0.0.1
  TARGET_IP: 10.0.0.10
  TARGET_PORT: '8081'
SNAT: []

with SetIndent(2) the result is:

DNAT:
  - DST_DEV: GREEN&ORANGE&BLUE
    DST_IP: 192.168.0.10
    DST_PORT: "8080"
    ENABLED: "on"
    FILTER_TARGET: ALLOW
    LOG: "off"
    NAT_TARGET: DNAT
    PROTO: tcp
    REMARK: test1
    SRC_DEV: ""
    SRC_IP: 127.0.0.1
    TARGET_IP: 10.0.0.10
    TARGET_PORT: "8081"
SNAT: []
@schneefisch
Copy link

The indentation is in the second line, so the output "SetIndent(2)" seems correct. The - is indented for two whitespaces.
did you try "SetIndent(0)"?

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

2 participants