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.

Support for handle multi line comments

See original GitHub issue

I am trying to use do a POC to process below yaml and print thhe comments. Code below.

---
# project comments
name: "Manager" #inline comment
# test command
# multi line comments
owners:
  - vikas #test list
  - nikhil
identifier: "manager" # identifier
description: "Test app" # final comment
InputStream inputStream = new YamlProcessor().getClass().getResourceAsStream("/yaml/project.yaml");

       final YamlMapping project = Yaml.createYamlInput(
               inputStream
       ).readYamlMapping();

       System.out.println("owners comment --> " + project.value("owners").comment().value());

The problem is that multi line comments value is coming out incorrect when I execute the code. Below is the output.

owners comment --> multi line comments
test command
inline comment
project comments

Is there any way we handle multi line comment ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vikas-harnesscommented, Jun 12, 2020

Thnx a lot @amihaiemil for the quick fix.

0reactions
amihaiemilcommented, Jun 12, 2020

@vikas-harness The fix for this has just been released with version 5.0.1. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support needed for multi-line comments #276 - GitHub
There's no support for multi-line comments. Something similar to Javascript support for multi-line comments would be useful (ref below).
Read more >
/* Multi-line comments */ - Progress Documentation
Allows you to add explanatory text to code. The comment begins with /* and ends with */. This type of comment can wrap...
Read more >
How do I use the help command to display multi-line comments?
How do I use the help command to display... Learn more about help command, comments. ... Multi-line comments can be achieved using: Theme....
Read more >
How to handle multi-line comments in a live syntax highlighter?
In my solution, when you enter "/*" to start the multi-line comment, I will comment all the following lines of code until I...
Read more >
Multiline comments in Python - GeeksforGeeks
The hash character should be placed before the line to be commented. Consecutive single-line comments can be used as multiline comments in ...
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