Skip to content

docs: clarify dictionary method keys#654

Open
janmarsino98 wants to merge 1 commit into
elapouya:masterfrom
janmarsino98:codex/docs-dict-method-keys
Open

docs: clarify dictionary method keys#654
janmarsino98 wants to merge 1 commit into
elapouya:masterfrom
janmarsino98:codex/docs-dict-method-keys

Conversation

@janmarsino98

Copy link
Copy Markdown

Summary

  • Document bracket notation for dictionary keys that collide with dictionary methods.
  • Clarify that autoescaping can prevent invalid XML but does not select the mapping key.

Why

{{ soil.pop }} resolves to the dictionary method rather than the pop context key. {{ soil['pop'] }} renders the intended value.

Fixes #496

Validation

  • git diff --check
  • Rendered a temporary DOCX with {{ soil['pop'] }} and confirmed that it reopens with the expected value.

@janmarsino98 janmarsino98 marked this pull request as ready for review July 14, 2026 13:01
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.

Corrupt document when passing a context with nested objects that have the word pop in the keys

1 participant