Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Node.JS Multi-line string

I tried to make these characters: [var str = "Some \ ] show as having a space at the end without the brackets involved, but was not able to. While that would be doable on

var str = "Some \

that syntax, it's hard to indicate there's a space after the slash.

SOOOO, without using another character (like a light mid dot) to indicate the space therein, is that possible with markdown?

For reference:

var str = "Some \ //has a space


var str = "Some \ //does not have a space

share|improve this question
If you actually put a space, there is one there (and it's selectable, etc.). Markdown renders it inside a <code> tag which doesn't clobber spaces on rendering. What would you propose? It may just be incumbent upon the poster to indicate that spaces belong there. – Daniel DiPaolo Jun 2 '11 at 22:21
@Daniel, see the new edit. I want the last two code lines to look differently. – jcolebrand Jun 2 '11 at 22:25
up vote 2 down vote accepted

If you need to make it apparent that there's a space, you'll have to do more than put one, you'll have to emphasize it elsewhere anyway. Compare, visually:

    no space here \
    but there is a space here \ 

(rendered with an unbreakable space, which is not a good idea when posting code since if you do copy-paste it it usually won't work). So you might as well use a visually distinct character, traditionally ␣:

    explicitly indicated space \␣ (note that means a space character)

There's a similar problem when you need to indicate a literal control character, which is less frequent but does happen occasionally:

    ␛knew title␛\ (where means a literal escape character, i.e., press Ctrl+V then Esc)

share|improve this answer

You can do this by prepending the line with space characters, instead of using backticks.

The following line should end with 6 spaces

var str = "Some \      


var str = "Some \ //does not have a space

But I'm not sure how to do this within a backtick code block.

share|improve this answer
The intent was to avoid using "// has six spaces" at all. I don't guess I made the link out to the revisions page prominent enough to reference the original question. Also note that in my question, I purposefully showed that I knew that I could use the code block syntax. Note the 2756 rep on meta ... I know this network pretty well. – jcolebrand Jun 2 '11 at 22:45
I guess I misunderstood your question. – Stefan Lasiewski Jun 2 '11 at 23:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .