+18
-5
lib/emitter.ml
+18
-5
lib/emitter.ml
···
+8
-8
tests/cram/collections.t
+8
-8
tests/cram/collections.t
···-{simple_sequence: [apple, banana, cherry, date]simple_mapping, {name: John Doe, age: 30, city: New York, country: USA}, nested_sequences: [[alpha, beta, gamma], [one, two, three], [red, green, blue]]nested_mappings, {person: {name: Alice, contact: {email: alice@example.com, phone: 555-1234}address, {street: 123 Main St, city: Boston}}}, mapping_with_sequences: {colors: [red, green, blue]sizes, [small, medium, large], numbers: [1, 2, 3]}sequence_with_mappings, [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], deep_nesting: {level1: {level2: {level3: {level4: [deeply, nested, values]another_key, value: }items, [item1, item2]}metadata, {created: 2024-01-01, modified: 2024-12-04}}}complex_structure, {database: {connections: [{host: db1.example.com, port: 5432, credentials: {username: admin, password: secret}}, {host: db2.example.com, port: 5432, credentials: {username: readonly, password: public}}]}services, [{name: api, endpoints: [/users, /posts, /comments]config, {timeout: 30, retries: 3}}, {name: worker, tasks: [email, reports]config, {concurrency: 10}}]}, empty_collections: {empty_sequence: []empty_mapping, {}, sequence_with_empty: [value1, [], value2]mapping_with_empty, {key1: value1, key2: {}key3, value3: }}}+{simple_sequence: [apple, banana, cherry, date], simple_mapping: {name: John Doe, age: 30, city: New York, country: USA}, nested_sequences: [[alpha, beta, gamma], [one, two, three], [red, green, blue]], nested_mappings: {person: {name: Alice, contact: {email: alice@example.com, phone: 555-1234}, address: {street: 123 Main St, city: Boston}}}, mapping_with_sequences: {colors: [red, green, blue], sizes: [small, medium, large], numbers: [1, 2, 3]}, sequence_with_mappings: [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], deep_nesting: {level1: {level2: {level3: {level4: [deeply, nested, values], another_key: value}, items: [item1, item2]}, metadata: {created: 2024-01-01, modified: 2024-12-04}}}, complex_structure: {database: {connections: [{host: db1.example.com, port: 5432, credentials: {username: admin, password: secret}}, {host: db2.example.com, port: 5432, credentials: {username: readonly, password: public}}]}, services: [{name: api, endpoints: [/users, /posts, /comments], config: {timeout: 30, retries: 3}}, {name: worker, tasks: [email, reports], config: {concurrency: 10}}]}, empty_collections: {empty_sequence: [], empty_mapping: {}, sequence_with_empty: [value1, [], value2], mapping_with_empty: {key1: value1, key2: {}, key3: value3}}}···-{compact_sequence: [{name: Alice, age: 25, city: Boston}, {name: Bob, age: 30, city: Seattle}, {name: Charlie, age: 35, city: Portland}]compact_nested, [{id: 1, details: {type: admin, permissions: [read, write, delete]}}, {id: 2, details: {type: user, permissions: [read]}}], compact_complex: [{key1: value1, key2: value2, nested: {sub1: val1, sub2: val2}}, {key1: value3, key2: value4, nested: {sub1: val3, sub2: val4}}]users, [{username: alice, email: alice@example.com, active: true}, {username: bob, email: bob@example.com, active: false}], compact_with_flow: [{name: service1, ports: [8080, 8443]env, {DEBUG: true, MODE: production}}, {name: service2, ports: [3000]env, {DEBUG: false, MODE: development}}]deep_compact, [{category: electronics, items: [{name: laptop, specs: {cpu: Intel i7, ram: 16GB, storage: 512GB SSD}}, {name: phone, specs: {os: Android, ram: 8GB, storage: 256GB}}]}, {category: furniture, items: [{name: desk, dimensions: {width: 150cm, depth: 75cm, height: 75cm}}, {name: chair, dimensions: {width: 60cm, depth: 60cm, height: 120cm}}]}], mixed_compact: {databases: [{type: postgresql, connection: {host: localhost, port: 5432}credentials, {user: admin, password: secret}}, {type: mongodb, connection: {host: localhost, port: 27017}credentials, {user: root, password: root}}]}single_line_compact, [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], sequences_in_compact: [{title: Project A, members: [Alice, Bob, Charlie]tags, [urgent, backend]}, {title: Project B, members: [David, Eve]tags, [frontend, design]}]compact_with_empty, [{id: 1, data: []meta, {}}, {id: 2, data: [item1]meta, {key: value}}], compact_complex_nesting: [{level: 1, children: [{level: 2a, children: [{level: 3a, value: leaf1}, {level: 3b, value: leaf2}]}, {level: 2b, children: [{level: 3c, value: leaf3}]}]}]api_endpoints, [{path: /users, method: GET, auth: required, params: [{name: page, type: integer, default: 1}, {name: limit, type: integer, default: 10}]}, {path: '/users/:id', method: GET, auth: required, params: []}, {path: /users, method: POST, auth: required, body: {username: string, email: string, password: string}}], compact_types: [{string_val: hello, number_val: 42, float_val: 3.14, bool_val: true, null_val: null}, {string_val: world, number_val: 100, float_val: 2.71, bool_val: false, null_val: null}]minimal, [{a: 1}, {b: 2}, {c: 3}]}+{compact_sequence: [{name: Alice, age: 25, city: Boston}, {name: Bob, age: 30, city: Seattle}, {name: Charlie, age: 35, city: Portland}], compact_nested: [{id: 1, details: {type: admin, permissions: [read, write, delete]}}, {id: 2, details: {type: user, permissions: [read]}}], compact_complex: [{key1: value1, key2: value2, nested: {sub1: val1, sub2: val2}}, {key1: value3, key2: value4, nested: {sub1: val3, sub2: val4}}], users: [{username: alice, email: alice@example.com, active: true}, {username: bob, email: bob@example.com, active: false}], compact_with_flow: [{name: service1, ports: [8080, 8443], env: {DEBUG: true, MODE: production}}, {name: service2, ports: [3000], env: {DEBUG: false, MODE: development}}], deep_compact: [{category: electronics, items: [{name: laptop, specs: {cpu: Intel i7, ram: 16GB, storage: 512GB SSD}}, {name: phone, specs: {os: Android, ram: 8GB, storage: 256GB}}]}, {category: furniture, items: [{name: desk, dimensions: {width: 150cm, depth: 75cm, height: 75cm}}, {name: chair, dimensions: {width: 60cm, depth: 60cm, height: 120cm}}]}], mixed_compact: {databases: [{type: postgresql, connection: {host: localhost, port: 5432}, credentials: {user: admin, password: secret}}, {type: mongodb, connection: {host: localhost, port: 27017}, credentials: {user: root, password: root}}]}, single_line_compact: [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], sequences_in_compact: [{title: Project A, members: [Alice, Bob, Charlie], tags: [urgent, backend]}, {title: Project B, members: [David, Eve], tags: [frontend, design]}], compact_with_empty: [{id: 1, data: [], meta: {}}, {id: 2, data: [item1], meta: {key: value}}], compact_complex_nesting: [{level: 1, children: [{level: 2a, children: [{level: 3a, value: leaf1}, {level: 3b, value: leaf2}]}, {level: 2b, children: [{level: 3c, value: leaf3}]}]}], api_endpoints: [{path: /users, method: GET, auth: required, params: [{name: page, type: integer, default: 1}, {name: limit, type: integer, default: 10}]}, {path: '/users/:id', method: GET, auth: required, params: []}, {path: /users, method: POST, auth: required, body: {username: string, email: string, password: string}}], compact_types: [{string_val: hello, number_val: 42, float_val: 3.14, bool_val: true, null_val: null}, {string_val: world, number_val: 100, float_val: 2.71, bool_val: false, null_val: null}], minimal: [{a: 1}, {b: 2}, {c: 3}]}···-{simple_flow_sequence: [apple, banana, cherry, date]simple_flow_mapping, {name: John, age: 30, city: New York}, nested_flow_sequences: [[a, b, c], [1, 2, 3], [red, green, blue]]nested_flow_mappings, {person: {name: Alice, age: 25}contact, {email: alice@example.com, phone: 555-1234}}, flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}]flow_map_with_seqs, {colors: [red, green, blue]sizes, [S, M, L], numbers: [1, 2, 3]}, deep_flow_nesting: {level1: {level2: {level3: {level4: [a, b, c]}}}}empty_flow, {empty_seq: []empty_map, {}, both: [[], {}]}, flow_in_block: {sequence: [1, 2, 3, 4, 5]mapping, {a: 1, b: 2, c: 3}, nested: {items: [x, y, z]config, {timeout: 30, retries: 3}}}block_in_flow, {users: [{name: Alice, tags: [dev, senior]}, {name: Bob, tags: [ops, junior]}]}, mixed_structure: {services: [{name: api, ports: [8080, 8443]env, {DEBUG: true, LOG_LEVEL: info}}, {name: db, ports: [5432]env, {POSTGRES_DB: mydb, POSTGRES_USER: admin}}]config, {version: 1, enabled: true}}flow_types, {strings: [hello, world, foo, bar]numbers, [1, 2, 3, 42, 100], mixed: [string, 123, true, false, null]quoted, [with spaces, 'special:chars', commas, here]}, flow_map_types: {string: value, number: 42, boolean: true, null_value: null, float: 3.14}nested_mixed, [{id: 1, data: [a, b, c]meta, {type: first}}, {id: 2, data: [d, e, f]meta, {type: second}}, {id: 3, data: [g, h, i]meta, {type: third}}], multiline_flow: {long_sequence: [item1, item2, item3, item4]long_mapping, {key1: value1, key2: value2, key3: value3}}edge_cases, {single_item_seq: [alone]single_item_map, {only: one}, nested_empty: [[], [{}], [{}, []]]all_empty, [{}, [], {a: []}, {b: {}}]}}+{simple_flow_sequence: [apple, banana, cherry, date], simple_flow_mapping: {name: John, age: 30, city: New York}, nested_flow_sequences: [[a, b, c], [1, 2, 3], [red, green, blue]], nested_flow_mappings: {person: {name: Alice, age: 25}, contact: {email: alice@example.com, phone: 555-1234}}, flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}], flow_map_with_seqs: {colors: [red, green, blue], sizes: [S, M, L], numbers: [1, 2, 3]}, deep_flow_nesting: {level1: {level2: {level3: {level4: [a, b, c]}}}}, empty_flow: {empty_seq: [], empty_map: {}, both: [[], {}]}, flow_in_block: {sequence: [1, 2, 3, 4, 5], mapping: {a: 1, b: 2, c: 3}, nested: {items: [x, y, z], config: {timeout: 30, retries: 3}}}, block_in_flow: {users: [{name: Alice, tags: [dev, senior]}, {name: Bob, tags: [ops, junior]}]}, mixed_structure: {services: [{name: api, ports: [8080, 8443], env: {DEBUG: true, LOG_LEVEL: info}}, {name: db, ports: [5432], env: {POSTGRES_DB: mydb, POSTGRES_USER: admin}}], config: {version: 1, enabled: true}}, flow_types: {strings: [hello, world, foo, bar], numbers: [1, 2, 3, 42, 100], mixed: [string, 123, true, false, null], quoted: [with spaces, 'special:chars', commas, here]}, flow_map_types: {string: value, number: 42, boolean: true, null_value: null, float: 3.14}, nested_mixed: [{id: 1, data: [a, b, c], meta: {type: first}}, {id: 2, data: [d, e, f], meta: {type: second}}, {id: 3, data: [g, h, i], meta: {type: third}}], multiline_flow: {long_sequence: [item1, item2, item3, item4], long_mapping: {key1: value1, key2: value2, key3: value3}}, edge_cases: {single_item_seq: [alone], single_item_map: {only: one}, nested_empty: [[], [{}], [{}, []]], all_empty: [{}, [], {a: []}, {b: {}}]}}······-[{id: 1, tags: [a, b, c]config, {enabled: true}}, {id: 2, tags: [x, y, z]config, {enabled: false}}]+[{id: 1, tags: [a, b, c], config: {enabled: true}}, {id: 2, tags: [x, y, z], config: {enabled: false}}]·········
+5
tests/cram/scalar_code_sample.yml
+5
tests/cram/scalar_code_sample.yml
+1
tests/cram/scalar_double_empty.yml
+1
tests/cram/scalar_double_empty.yml
···
+1
tests/cram/scalar_double_quote.yml
+1
tests/cram/scalar_double_quote.yml
···
+1
tests/cram/scalar_double_simple.yml
+1
tests/cram/scalar_double_simple.yml
···
+1
tests/cram/scalar_empty_folded.yml
+1
tests/cram/scalar_empty_folded.yml
···
+1
tests/cram/scalar_empty_literal.yml
+1
tests/cram/scalar_empty_literal.yml
···
+4
tests/cram/scalar_folded_basic.yml
+4
tests/cram/scalar_folded_basic.yml
+4
tests/cram/scalar_folded_comment.yml
+4
tests/cram/scalar_folded_comment.yml
+8
tests/cram/scalar_folded_indent_preserve.yml
+8
tests/cram/scalar_folded_indent_preserve.yml
+6
tests/cram/scalar_folded_para.yml
+6
tests/cram/scalar_folded_para.yml
+5
tests/cram/scalar_folded_strip.yml
+5
tests/cram/scalar_folded_strip.yml
+4
tests/cram/scalar_indent2_folded.yml
+4
tests/cram/scalar_indent2_folded.yml
+6
tests/cram/scalar_indent2_keep.yml
+6
tests/cram/scalar_indent2_keep.yml
+4
tests/cram/scalar_indent2_literal.yml
+4
tests/cram/scalar_indent2_literal.yml
+4
tests/cram/scalar_indent2_strip.yml
+4
tests/cram/scalar_indent2_strip.yml
+6
tests/cram/scalar_keep_folded.yml
+6
tests/cram/scalar_keep_folded.yml
+4
tests/cram/scalar_literal_indent.yml
+4
tests/cram/scalar_literal_indent.yml
+8
tests/cram/scalar_nested_blocks.yml
+8
tests/cram/scalar_nested_blocks.yml
+1
tests/cram/scalar_plain_simple.yml
+1
tests/cram/scalar_plain_simple.yml
···
+5
tests/cram/scalar_plain_types.yml
+5
tests/cram/scalar_plain_types.yml
+7
tests/cram/scalar_seq_blocks.yml
+7
tests/cram/scalar_seq_blocks.yml
+1
tests/cram/scalar_single_dquote.yml
+1
tests/cram/scalar_single_dquote.yml
···
+1
tests/cram/scalar_single_empty.yml
+1
tests/cram/scalar_single_empty.yml
···
+1
tests/cram/scalar_single_escaped.yml
+1
tests/cram/scalar_single_escaped.yml
···
+1
tests/cram/scalar_single_simple.yml
+1
tests/cram/scalar_single_simple.yml
···
+4
tests/cram/scalar_special_chars.yml
+4
tests/cram/scalar_special_chars.yml
+3
tests/cram/scalar_whitespace.yml
+3
tests/cram/scalar_whitespace.yml
+40
-136
tests/cram/scalars.t
+40
-136
tests/cram/scalars.t
·································{"outer": {"inner": {"description": "This is a folded description.\n", "code": "def test():\n return True\n"}}}
+1
tests/cram/tab_columns.yml
+1
tests/cram/tab_columns.yml
···