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.

Sending multi-line string removes lines starting with hash

See original GitHub issue

Sending the following multi-line string to terminal removes # hello which is mistakenly treated as comment:

text <- "
# hello
this is new #hello
"

Instead the following is actually sent to terminal:

> text <- " 
  this is new #hello 
  "

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
andycraigcommented, May 6, 2020

Yes, cleanLine is still needed. Without it, the # } case will incorrectly match the commented brace.

1reaction
renkun-kencommented, May 6, 2020

I tested with

function() {
    1
# }
    2
}

and it works well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking up long strings on multiple lines in Ruby without ...
I'm fairly sure that it's not; I tried both undef'ing and redefining String#+ and it doesn't seem like anything is being sent there....
Read more >
How to remove lines starting with any prefix using Python?
Given a text file, read the content of that text file line by line and print only those lines which do not start...
Read more >
Chapter 6 – Manipulating Strings
A multiline string in Python begins and ends with either three single quotes or three double quotes. Any quotes, tabs, or newlines in...
Read more >
Online Remove Lines Containing string - Code Beautify
Best Online Tool to Remove Lines Containing Text or String. ... This tool saves your time and helps to remove all line containing...
Read more >
How to prepend multiple lines to a file - Unix Stack Exchange
The safest way to do this would be to copy the original file to a temporary location, and the concatenate the new contents...
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