Skip to content

Nested interpolation lost when mixed inside string context #177

@aniongithub

Description

@aniongithub

Summary
When using Himl’s (himl==0.15.2 from pip) nested interpolation ({{foo.bar}}) inside a longer string, the interpolation silences the surrounding text and resolves only to the raw value. But when using the same interpolation alone, it works correctly.


Steps to reproduce

  1. Create foo.yaml:

    foo:
      bar: 42
  2. Create baz.yaml:

    resources:
      test:
        type: example:Test
        properties:
          path: "hello {{foo.bar}} world"
  3. Run:

    himl-config-merger foo.yaml baz.yaml > merged.yaml
  4. Expected in merged.yaml:

    resources:
      test:
        properties:
          path: "hello 42 world"
  5. Actual result:

    resources:
      test:
        properties:
          path: 42

    — The string collapses to just 42.

  6. Alternative case that does work:

    path: "{{foo.bar}}"

    → Correctly interpolates to:

    path: 42

Any help would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions