Skip to content

Add two new editor methods#2

Open
jonathanrainer wants to merge 1 commit into0k:mainfrom
jonathanrainer:add-editor-utilities
Open

Add two new editor methods#2
jonathanrainer wants to merge 1 commit into0k:mainfrom
jonathanrainer:add-editor-utilities

Conversation

@jonathanrainer
Copy link

Adds two new Editor methods:

  • set_scalar_at: sets a scalar value without YAML parsing, allowing values containing : or other YAML-special characters
  • rename_key_at: renames a mapping key in-place, preserving the value and key ordering

Also extracts the shared node-placement logic from set_yaml_at into a private set_node_at helper, which both new methods reuse.

No new fyaml-sys symbols required.

Adds two new Editor methods:
- ``set_scalar_at``: sets a scalar value without YAML parsing, allowing
  values containing ``:`` or other YAML-special characters
- ``rename_key_at``: renames a mapping key in-place, preserving the
  value and key ordering

Also extracts the shared node-placement logic from ``set_yaml_at`` into
a private ``set_node_at`` helper, which both new methods reuse.

No new fyaml-sys symbols required.
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.

1 participant