What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

http://stackoverflow.com/posts/6220514/revisions

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

vs

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

2 Answers 2

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 \      

vs

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

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 must log in to answer this question.

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