Comments for key value pairs
See original GitHub issueHello! 👋🏻
I’m trying to build a YAML document similar to the following:
# Some comment 1
key1: value1
# Some comment 2
key2: value2
I’ve gone through the comment documentation, but there doesn’t seem to be a way of attaching a comment line above an individual key-value pair mapping. Have I missed something?
Thanks in advance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Matching key/value pairs with comments - Stack Overflow
For a JavaScript application, I'm trying to come up with a regex that will match key/value pairs in a string. It's working pretty...
Read more >2.1. YAML Guide - Common Workflow Language
Fundamentally, a file written in YAML consists of a set of key-value pairs. Each pair is written as key: value , where whitespace...
Read more >What Is a Key-Value Pair (KVP)? Definition and Examples
A key-value pair is a set of data that represents two associated groups through a key and a value. This type of data...
Read more >Keep comments above a key-value pair as is #11 - GitHub
The general problem is that comments are contextual and do not always only reference the lines that follow. This makes them hard to...
Read more >Unified key-value interface - SWI-Prolog - Discourse
I propose creating a new library(kv_pairs) that provides a unified set of lookup/update/delete predicates. I have two reasons for doing this: It's not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@PyvesB By the way, your YAML example looks good, I don’t think you will have problems parsing it with eo-yaml. However, shuffle through the open Issues, there are a few bugs concerning multiple-line scalars (block and flow scalars) and such.
Again, as I see you don’t have those types of scalars, so you should be ok 😄
@amihaiemil thank you for resolving this ticket. I’ve just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard.