Ask Your Question
2

text between angle brackets is silently dropped (in preview)

asked 2010-09-04 05:11:55 -0500

niles gravatar image niles
473 12 4 17

updated 2010-09-04 06:45:25 -0500

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)

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2010-09-04 14:25:03 -0500

Evgeny gravatar image Evgeny flag of Chile
11329 50 84 183
http://askbot.org/

updated 2010-09-04 15:08:42 -0500

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.

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: 2010-09-04 05:11:55 -0500

Seen: 164 times

Last updated: Sep 04 '10