ruby / ruby/psych

Feature: configure block scalar type

Open
#624 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
597
Forks
223
Avg merge
11h 23m
Merged PRs (30d)
3

Description

I'd like to be able to do the following:

{
  long_string_content: "This is a very long string that I want to display in a literal block in my YAML output"
}.to_yaml(fold: "|")

With acceptable :fold basic values: |, >, and other combinations such as |- or >+.

Inspired by this SO answer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by tracing Psych's to_yaml serialization path and existing handling of YAML scalar styles, then identify coverage for |, >, |-, and >+; done means the fold option is accepted and emitted YAML uses the requested block style.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby, yaml
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.