Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

You can escape asterisks on HN with \.


sort by: page size:

AFAIK there's no way to escape asterisks on HN. Backslashes certainly don't work. :(

HN now supports backslash escapes for asterisks (which, unescaped, are markup notation for italics).

oh, bother, I forgot what HN does to asterisks. In what I wrote above, look for the bit in italics and mentally insert asterisks on each side of it. It was right when I typed it in, I promise...

HN formatting has swallowed your asterisks; try writing them as \*

HN converts asterisks to italics and I too couldn't find a way to escape them, except when surrounded by backticks `*`. Not a C-friendly discussion forum :-)

tip: In HN comments you can write \* to display an asterisk.

Probably trying to make it italic, which is indeed a convention. Asterisks will work better on hn.

Meta: To write a literal * character on HN, you want to escape it as \*

btw you can do italics on HN using asterisks like this.

It's not helped by the fact than HN markup is interpreting asterisks as requests for italics and backslashes as escape sequences...

No I didn't, HN mangled the text to italics and I did not spot it. Too late to edit. That's why lisp and C are in italics :) How do you make an asterisk in HN anyway?

If you edit to replace your asterisks with [STAR], your post will make more sense. To the best of my knowledge the only reliably way to get an asterisk to display in an HN post is to use only one. (Maybe sometimes stick it in the middle of the word.) Backslash does nothing useful.

Edit: I had a guess about how to escape asterisks here, and it didn't work!

Sorry, none of us could figure out how to escape the asterisks, how'd you do it? Feel like I'm trying to triforce here.

HN markup strikes again (OP wrote .X@.X, where X is an actual asterisk, which HN renders as .<i>@.</i>)!

You should know that HN lets you prefix stars with a backslash to escape them, so your text ends up saying, ex. foo*bar and bar*baz rather than foobar and barbaz

The HN markdown is interpreting your asterisks a signals to start/stop italics. You need to escape them with a \ first.

For future reference, HN formatting uses asterisks to start and end italics.

My mistake was thinking [] was a single symbol.


When writing a comment on HN, if you wrap a word in asterisks, they disappear and the word is italicized. That’s how Markdown-based text works, but usually the user can place a backslash before the first asterisk to escape it (e.g. try on GitHub) in order to prevent this and instead display the asterisks literally. This does not seem to be possible on HN. Is there an alternative?
next

Legal | privacy