Skip to content

fix(doc-util): escape dotted keys#34

Draft
Duologic wants to merge 1 commit intomasterfrom
duologic/fix_dotted_keys
Draft

fix(doc-util): escape dotted keys#34
Duologic wants to merge 1 commit intomasterfrom
duologic/fix_dotted_keys

Conversation

@Duologic
Copy link
Member

Attempt to fix #16 in doc-util rendering, this is a bit more complex than I anticipated, I've used this example to test various places where dotted keys can be.

local d = import './doc-util/main.libsonnet';

d.render(
  {
    '#': d.pkg('a', 'a', 'a',),
    '#has.a.period': d.val('help1'),
    'has.a.period': null,
    'more.period.keys': {
      '#': d.pkg('more.period.keys', 'c', 'more.period.keys',),
      'also.has.period': {
        '#period': d.val('help2'),
        period: null,
        '#has.a.period': d.val('help3'),
        'has.a.period': null,
      },
    },
    has: {
      a: {
        '#period': d.val('help4'),
        period: null,
        '#has.a.period': d.val('help5'),
        'has.a.period': null,
      },
    },
  }
)

I also don't think people should use dotted keys as they are confusing, but that is another discussion.

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

Successfully merging this pull request may close these issues.

Confusing output for keys with periods in them

1 participant