How to enter a multi-line command

You can use a space followed by the grave accent (backtick): However, this is only ever necessary in such cases as shown above. Usually you get automatic line continuation when a command cannot syntactically be complete at that point. This includes starting a new pipeline element: will work without problems since after the | the … Read more

Are multi-line strings allowed in JSON?

JSON does not allow real line-breaks. You need to replace all the line breaks with \n. eg: “first line second line” can saved with: “first line\nsecond line” Note: for Python, this should be written as: “first line\\nsecond line” where \\ is for escaping the backslash, otherwise python will treat \n as the control character “new line”

Are multi-line strings allowed in JSON?

Is it possible to have multi-line strings in JSON? It’s mostly for visual comfort so I suppose I can just turn word wrap on in my editor, but I’m just kinda curious. I’m writing some data files in JSON format and would like to have some really long string values split over multiple lines. Using … Read more

Creating multiline strings in JavaScript

Update: ECMAScript 6 (ES6) introduces a new type of literal, namely template literals. They have many features, variable interpolation among others, but most importantly for this question, they can be multiline. A template literal is delimited by backticks: (Note: I’m not advocating to use HTML in strings) Browser support is OK, but you can use transpilers to be more … Read more

Creating multiline strings in JavaScript

Update: ECMAScript 6 (ES6) introduces a new type of literal, namely template literals. They have many features, variable interpolation among others, but most importantly for this question, they can be multiline. A template literal is delimited by backticks: (Note: I’m not advocating to use HTML in strings) Browser support is OK, but you can use … Read more