We use the dollar sign link for code and the " for quotes right, Why am I seeing code formated as quotes? One example is this answer https://askubuntu.com/posts/146792/revisions

I have heard that some don't like how it looks, But it looks that way on purpose, It's mono-space so we can tell where the spaces are, and the font so we can tell the difference between certain letters and numbers


Code/Formated/as/quote oO0 1 IL il /\| some example of characters with code formated /sda/bin/abcde/bcda/bin.bin quote and it wraps around even when you don't have a break in text makes it confusing.

Code/Formated/as/code oO0 1 IL il /\| some example of characters with code formated as code and scrolls
And maintains the lines and you can see spaces clearly.

What is the proper way to format code?

  • Sorry, that annoyed me too much, had to change it :) – Marco Ceppi Jun 5 '12 at 15:03
  • Sure thing, code is now formated as code. – Mateo Jun 5 '12 at 15:06
  • Here is another example, this one is not from a new user, askubuntu.com/posts/146633/revisions – Mateo Jun 5 '12 at 15:10
  • @mateo_salta sorry il keep that in mind. – Ashu Jun 5 '12 at 15:49
  • Could there possibly be an automated script to find quotes and inline code based on key words and put it in a list to be reviewed by users? – nanofarad Jun 5 '12 at 20:43

It's incorrect. Fix it when you see it. Also new users tend to put a dollar sign too

$ do this command

but our style here is no $, so usually I do them both at once.

  • awesome, I meant the little links for formating in my question, the "img" for images the " for quotes, ect. , but I have also seen the $ happen too, so good point. – Mateo Jun 5 '12 at 15:44
  • 1
    Yeah, I've seen novices type/paste the $ sign into the Terminal, a number of times. I have prewritten text I use as the edit summary when I edit a post to remove them: removed leading $ because it is confusing to someone new to the command-line ("Do I type that?") and superfluous to the experienced However, in some instances the $ is the only thing telling the reader that the text is supposed to be entered on the command-line. In these situations, further editing is required when removing it (but this editing is necessary anyway because $ doesn't mean anything to many users). – Eliah Kagan Jun 5 '12 at 17:22
  • I only use $ on the first line of a multi-line paste showing the output from some command. If that's not ok, alternatives? – ish Jun 6 '12 at 11:48
  • @izx I think that when you're pasting code that actually contains $ as part of a prompt, that's fine. But I don't recommend providing instructions just by pasting blocks of text from a Terminal in which they have been followed. That's sometimes good as an example, but for instructions, just the commands that people run should be provided (and those without a leading $). It's often not sufficiently explanatory to just list the commands people should run, one after another, but when it isn't, the solution is to include prose (often in between) explaining things. – Eliah Kagan Jun 7 '12 at 17:35

You must log in to answer this question.

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