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

5080 questions
2
votes
1 answer

git bisect in combination with CRLF/LF

I am trying to git bisect some bad behavior in a public repo. The repo has: some commits with CRLF (I am on MacOS, so expecting LF) a .gitattributes file in its root, normalizing .c, .h, and .java files As I understand it, none of the present…
Gauthier
  • 40,309
  • 11
  • 63
  • 97
2
votes
1 answer

python3 for win and cygwin - line endings in buffer

Setup: python3.6 for windows in Cygwin (have to use Win version because of functionalities introduced in 3.5 and Cygwin is stuck at 3.4) How to get \n new lines in buffer (stdout) output from a python script (instead of \r\n)? The output is a list…
mikmach
  • 23
  • 2
2
votes
1 answer

Force a new line character in query string

I've got a link that I'm using to add an entry into my Google calendar. I'm getting the data from database which is stored in a human readable format (it was initially captured from a text area), which typically is spread over more than one line,…
User_FTW
  • 504
  • 1
  • 16
  • 44
2
votes
3 answers

powershell get-content ignore newline

When you use set-content Set-Content C:\test.txt "test","test1" by default the two provided strings are separated by a newline, but there is also a newline at the end of the file. How do you ignore this newline or newline with spaces when using…
foureight84
  • 402
  • 2
  • 7
  • 19
2
votes
1 answer

Python keeping newlines in lxml.html after cssselect and text_content()

In python, How do I preserve paragraphs (i.e. keep newlines) when using lxml.html? For example, the following will strip

tags and join the lines, which is not what I want: body = doc.cssselect("div.body")[0] content =…
Lionel
  • 3,188
  • 5
  • 27
  • 40
2
votes
1 answer

Regex matches online but not in C# code

This regex works at online regex testers but when I try this piece of code regex does not match. Regex regex = new Regex(@"^\.lnr-(.*)\:before \{$", RegexOptions.Compiled | RegexOptions.Multiline); string css =…
Onur Yönt
  • 31
  • 5
2
votes
2 answers

%c keeping new line char in while loop, fix?

/*Title: P3.c Location: ~/csc1710/P3/P3.c Class: CSC1710 Name: Emily Date: 02-18-2017 This program is meant to convert a colored image to black and white.*/ #include #include int main(void) { int height, width; char…
Emily
  • 23
  • 2
2
votes
1 answer

Move to next line in a file C++

Here is an incomplete fraction of a program I am writing. To summarize, the program takes info from an input file ( a name and ID then a series of numbers) does some math and then prints the answers in an output file. Right now the program prints…
Morgan
  • 153
  • 1
  • 2
  • 14
2
votes
2 answers

red how to write newlines to output file

I'm working in Windows and appending lines to a text file in Red using write/append/lines %MC_testfile.txt "output text here" And the output text is duly appended but not on a new line. How do I get my appended text on a new line?
2
votes
4 answers

How do I get connect-flash to return multiple messages, or a single message with newline characters?

I'm building an app using nodejs. I created a form, and I'm working on back-end validation of user input. Basically, I have a var, "messages", and each time I encounter an input error, I append the error to messages. var messages…
Asool
  • 13,031
  • 7
  • 35
  • 49
2
votes
1 answer

Bash not printing newlines from function?

I have a function I wanted to use for getting/checking website certs. I use ZSH but wanted to test it in BASH as well to verify that it works as well in that shell. The function seems to print out the content as a single line and isn't noticing or…
krizzo
  • 1,823
  • 5
  • 30
  • 52
2
votes
2 answers

XHTML Linebreak space problem

basically i have a ul list
2
votes
1 answer

force line break in xml displayed in html using xsl

must preserve line breaks in sms messages. must be viewable in web browser. please help. my goal is to open "sms.xml" in browser and see "line1" and "line2" (from message body) on separate lines i have two files: sms.xml:
2
votes
1 answer

Why does sed make line terminators visible in vim

I have textfile with CRLF line terminators. The file contains two lines of text (displayed in Vim) : foo bar Say I want to find pattern foo and replace the entire line with goo, so I run: sed -i 's/foo.*/goo/' textfile After the operation…
gortsu
  • 126
  • 8
2
votes
2 answers

AppleScript adds Enter/NewLine to clipboard when paste into Word

I'm currently trying to write an AppleScript for my Touchbar, which does copy a predefined variable into the clipboard and then pastes it into a word document. Well, it does work, but for some reason in addition of just pasting the variable text, it…
derRAV3N
  • 25
  • 3
1 2 3
99
100