Questions tagged [newline]
Newline refers to a character sequence representing a line break in text (also known as End of Line, EOL, or Line Break). Different operating systems have different sequences for newlines.
newline
5,120
questions
0
votes
0
answers
13
views
Github Actions: Array String as an input from a env variable
I am using docker/build-push-action@v5 and need to pass build-contexts from variable. Its type is List of strings: https://github.com/docker/build-push-action?tab=readme-ov-file#inputs
If I specify ...
0
votes
3
answers
56
views
In batch (`.bat`), how do I set a variable to print multiple newlines?
From this other SO post, learned that
SET n=^&echo(
echo First line%n%%n%Second line
prints
First line
Second line
How do I define nn to print 2 new lines? The following didn't work
SET n=^&...
1
vote
0
answers
36
views
Git: Want to propagate (rebase) LF vs. CRLF changes through branch revisions
Say, I have a branch with several commits in it.
In versions A and B, I have a file with mixed line endings (mostly LF, but some CRLF), and made various other changes to it.
In version C, I made ...
-1
votes
2
answers
76
views
How to prevent a paste in a cell with carriage returns from overwriting the values below?
In apps script, how to prevent pasting text in a cell (keyboard shortcuts) with carriage returns from overwriting the values below?
I tried a onedit(e) function, but we cannot intercept keyboard ...
0
votes
1
answer
81
views
About writing/reading "\r\n" to/from a file
Why, if you write a string containing "\r\n" to a file opened in binary mode, and then read that string from the same file, but opened in text mode, then the string will contain '\n' ...
0
votes
1
answer
79
views
git add --renormalize does not re-checkout my files with the correct line endings
I have a repository which I use between Windows and Linux.
Currently some files, for example the file myfolder/myfile.txt is stored with CRLF (DOS) line endings and checked out with CRLF linedendigs.
...
2
votes
0
answers
73
views
R shows newline when printing character vector
When printing a character vector, R shows a newline between the first and the second element, but not between the 2nd and the 3rd, and then again between the 3rd and the 4th.
Why is that?
Code:
> ...
0
votes
0
answers
70
views
Pygments newlines and white-space causing lexing errors
( This question needs to be reworked as all the problems except those involving conditional instructions have been solved. As the question is now, it's a mess )
First, a big N.B. : I am not a Python ...
3
votes
2
answers
62
views
convert newlines to windows newlines [duplicate]
I want to convert all newlines in my input string to windows newlines (\r\n). So I want to apply the following mapping:
\r\n -> \r\n
\r -> \r\n
\n -> \r\n
How should this be done?
0
votes
1
answer
94
views
Cannot inject newline characters into input field using Nodriver
I am using Python to automate interactions with a web application. My goal is to send newline characters into an input field to separate domain names, but all attempts have failed to properly input ...
0
votes
0
answers
20
views
Qtspim does not respond during new line
I was making a program for Qtspim that prints from 1 to 10 using a while statement.
It worked fine but the console output was 12345678910, so I wanted to add new lines to be fancier.
This is my code.
#...
0
votes
2
answers
76
views
Can I use Notepad++ to remove line breaks from strings and keep things neat?
I'm working on translating an old game. I have the strings displayed/organized like this
This is a
sentence that you
really need to read.<End>
This is also a
sentence that you
need to read.<...
-1
votes
2
answers
75
views
Why does `echo` interpret "\n" as new line character only in interactive shells and not when executing a shell script?
Why does echo interpret "\n" as new line character in interactive shells only and not when executing a shell script also?
Running in an interactive bash shell:
$ echo "hello\nworld"...
0
votes
1
answer
61
views
Adding variables to an API payload with new lines in Python
I am pretty new to Python, and what I'm trying to achieve is to add variables to the payload below in Python; it's meant for Zeptomail API, and I'm trying to customize and add user-specific data to ...
-1
votes
1
answer
97
views
Why isn't "\n" interpreted as newline character when a String like, "abc\nabc" is given as input via Scanner class in Java?
In Java, when we try to print a Hardcoded String like, "abc\nabc", we observe a line change after the first abc but when we take same input via sc.next() or sc.nextLine() it prints out '\n' ...