question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comments for key value pairs

See original GitHub issue

Hello! 👋🏻

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:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amihaiemilcommented, Dec 1, 2020

@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 😄

0reactions
charlesmikecommented, Dec 1, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found