NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm sure I'm not alone in wondering how to properly format an answer to a question in this Help system. It uses what, to me at least, is an arcane system of markup characters that I love to hate.

I was answering another mapper's question just now and struggled to find a way to use underscore characters. In this Help system, an underscore toggles emphasis (or Italics if you prefer), making it tricky to include an actual underscore in the text of your answer. My workaround was to use a space with the old-style HTML underscore command enclosing a space. Now I see that the HTML code: ampersand-pound-95-semicolon,  _  , will do the job better.

In that last sentence, I wanted to include the code for HTML underline toggle but could not include it as an example because it gets treated as an operator, not as plain text. How does one "escape" this action?

I assume there must be a guide to the way this Help system uses HTML codes and how one produces special characters that show up in one's answers. Can you point that out to me?

Thanks for the assistance.

asked 08 Aug '17, 20:45

AlaskaDave's gravatar image

accept rate: 16%

edited 08 Aug '17, 20:49

There's a "?" above the answer edit box with a link to information about the formatting syntax, which is some version of Markdown.

To insert a character that is used for formatting, place a backslash (\) before the character. So to generate the \ in that previous sentence I had to insert \\ in my answer text. An underscore would just be \_ but in my answer it looks like \\\_, because \ is also a special character.

Lots of systems that have special characters use \ for escaping them.

permanent link

answered 08 Aug '17, 22:09

maxerickson's gravatar image

accept rate: 32%

Thanks, Max, that's just what I was looking for. By the way, I tried using a single backslash character to escape the underscore and when that didn't work I resorted to using the HTML method. As you point out, I needed three backslashes.

Thanks again.

(08 Aug '17, 22:36) AlaskaDave

Three backslashes should only be necessary to create \_ in the output. A single backslash followed by an underscore should place an underscore in the output.

(08 Aug '17, 23:00) maxerickson

Yes, I misspoke. Looking back at my scribbling I see that I was trying to use a forward slash, not a backslash. I went back a few minutes ago and edited my answer to the other question so I was able to put your info to good use right away.

Thanks again.

(08 Aug '17, 23:23) AlaskaDave

Side note: This help system parses your text client-side (in Javascript) for a preview, and after submitting, your text is parsed server-side (in PHP or whatever) for incorporation in the page text. Both parsers are slighly different; it has happened to me that using an underscore triggered italics in the preview but not the final text.

(09 Aug '17, 08:13) Frederik Ramm ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Aug '17, 20:45

question was seen: 1,596 times

last updated: 09 Aug '17, 08:13

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum