This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to use the “less than” symbol in questions and answers?

0

Every time I try to use the < (less than) or > (greater than) symbols, the output is never what I want. What's the trick at using those symbols?

For example, if I wanted to illustrate the tshark command of tshark -R < Read filter>, I can only do so if I ensure there's at least once space after the < symbol. If I omit the space, then I end up with this: tshark -R <Read filter> ... which causes the text to not be displayed. I've tried searching the OSQA markdown syntax, such as at https://sourceforge.net/p/osqa-rus/discussion/markdown_syntax to no avail.

Edit: And now that I see my question posted, I see that the text is displayed as intended, so apparently it's just the preview that's a mess? I'm going to guess this is just a bug with the preview. Assuming so, maybe there's an OSQA update that fixes this?

asked 27 Jul '16, 14:06

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

edited 27 Jul '16, 14:46

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572


One Answer:

0

I assume you're referring to the preview display of your question being messed up by the less than symbol?

A good way to avoid problems with that is to surround the less-than (and greater than) symbols in back quotes (thus marking it as <code>).

answered 27 Jul '16, 14:45

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

Thanks, that seems to work with the obvious down-side of forcing you to use code for those characters, which you may not really want to do just to appease the previewer.

But there's another problem - how to get preformatted text (i.e., a text block indented 4 spaces to preview properly? I guess you're forced to use a <code> </code> block instead and back-tick the characters?

(27 Jul '16, 16:11) cmaynard ♦♦

You can always fall back to good-old HTML escapes &lt; and &gt;

<Hello Cris>

(27 Jul '16, 22:31) Jaap ♦

@Jaap, thanks. Yes the escape sequences work with inline text or within a <code> </code> block, but again fail for preformatted text blocks (those indented by 4 spaces) ... mostly.

If, for example, you attempt to insert tshark -R <Read filter> (here I used escape sequences) within the literal <code> </code> that I just wrote above, then it fails again. If you add a space following the < character, then it displays properly in the preview.

(28 Jul '16, 06:21) cmaynard ♦♦