First time here? Check out the FAQ!
3

text between angle brackets is silently dropped (in preview)

python:
>>> L = [1,2,3]
>>> type(L)
<type 'list'="">
>>> 

should read:

python:
>>> L = [1,2,3]
>>> type(L)
<type 'list'>
>>> 

EDIT: Oh, they don't get dropped from the posted question, only from the preview! <even here?="">

EDIT 2: the above should be <even here?>

It seems that angle brackets are ignored, together with everything between them, probably for html reasons. Using "& lt ;" etc. of course fixes this, so <this doesn't get dropped>, but this could be a problem when pasting code snippets, as above.

What to do about this? Maybe just let people post confusing code snippets until they figure out they need to modify them . . . or maybe toss up a warning flag when angle brackets are detected? Come to think of it, putting up a flag when any kind of special markup is detected might be useful for new users who are unaware of it. Then people trying to post a question involving subscripts wouldn't inadvertently be italicizing part of their question. (e.g. the first line of this question from asksage)

niles's avatar
808
niles
updated 2010-09-04 06:45:25 -0500, asked 2010-09-04 05:11:55 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Looks like there are inconsistencies between the markdown renderers in previewer (and maybe errors within), there isn't an easy fix I'm afraid, b/c only extensive testing can validate a parser well.

What you suggest - giving a warning on use of special characters - might work actually and can be done.

The workaround is to use backticks around the inlined literals or four leading spaces on each literal line. That's the official markdown for the snippets of code.

You can also select the text you want to post as a literal snippet and then hit the "preformatted text" button (the one with one's and zeroes) or a combination of keys Ctrl-K.

The reason things with angle brackets "disappear" is that markdown does allow HTML tags, however markdown parsers do not perform full input validation and do not give warnings on edge cases.

I will put out better tooltip help for markdown - looks like people need better heddukation - and try to add an alert like you've suggested.

Evgeny's avatar
13.2k
Evgeny
updated 2010-09-04 15:08:42 -0500, answered 2010-09-04 14:25:03 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments