Question of curiosity about Goldmark extra extensions

Just a question of curiosity about Goldmark extra extensions.

Why is the configuration of the type (in YAML):

markup:
  goldmark:
    extensions:
      extras:
        insert:
          enable: false
        mark:
          enable: false
        subscript:
          enable: false
        superscript:
          enable: false

or (in TOML):

[markup.goldmark.extensions.extras]
  [markup.goldmark.extensions.extras.insert]
    enable = false
  [markup.goldmark.extensions.extras.mark]
    enable = false
  [markup.goldmark.extensions.extras.subscript]
    enable = false
  [markup.goldmark.extensions.extras.superscript]
    enable = false

And not the simpler and “prettier” type (in YAML):

markup:
  goldmark:
    extensions:
      extras:
        insert: false
        mark: false
        subscript: false
        superscript: false

or (in TOML):

[markup.goldmark.extensions.extras]
insert = false
mark = false
subscript = false
superscripte = false

Are there any other options (hidden or coming soon)?
Or is it a technical constraint that I don’t understand?

In any case, thank you very much for this development and for the rigorous updating of the documentation.

We don’t know, but learning from the past, there are many examples with bool flags turned into structs (because some option needed more config), so we might as well prepare for that, which avoids us having to support both constructs down the line.

1 Like

One recent example being the CJK setting:

 [markup.goldmark.extensions.cjk]
        eastAsianLineBreaks = false
        eastAsianLineBreaksStyle = 'simple'
        enable = false
        escapedSpace = false

I think that started out as a boolean and then …

The same thing happened with the typographer extension.

1 Like