FAQ Discussion: Escaping and posting code
-
Discussion for this FAQ: link
I'm suprised that you left out the four-spaces method of putting in code.... It solves a bunch of the edge conditions with backticks and
[code]
, at the cost of being slightly more annoying to write.And it goes well in a list - you just have to put 8 spaces instead of 4 (because Markdown.)
Four-Spaces
backticks
Holy fuck, the [code] block messes up the earlier part of my post. Because it matches the [code] earlier. O.o
Anyways, in a list:
-
First Item
some code
-
Subitem
some more code
-
-
Top-Level Item
-
Top-Level
MOAR CODE
-
Top-Level again
My post: http://what.thedailywtf.com/raw/2204/1
Note that omitting the extra newlines when in a list will cause the list to be degenerate.
-
-
I'm suprised that you left out the four-spaces method of putting in code....
I didn't. It's at the bottom in the bit about where four spaces is insufficient if the code concerned is in a list. (Because the examples were, as you may have guess by now, in a list.) It's the last bullet.
Search for
8, 12, 16
That post needs some TLC anyway since the markdown's degenerated since it was first posted...
-
You've missed "randomly flail around, cursing discoursistency"
-
I'm suprised that you left out the four-spaces method of putting in code.... It solves a bunch of the edge conditions with backticks and [code], at the cost of being slightly more annoying to write.
slightly more? Sure if your code is only 3 lines, you only have to hit the space bar 12 times and click 3 times to move the cursor. CONVENIENT!
If your code is 30 lines, well, now you have to copy it out of Discourse into something like SublimeText, try to figure out how the fuck to get it to add spaces to every line simultaneously, then copy it back. Sure, Discourse could just add a button for this in the toolbar, but why fucking would they? Also if they did, it'll look kind of like this:
i.e. an unintelligible mess of pixels.
Anyway, shit be wack is basically my arguement.
-
There is a button in the toolbar - it's this one
</>
.It's still annoying.
-
indent preformatted text by 4 spaces
Oh wait then... what? How is indent different than code? Or are you saying it doesn't do code, it just does <pre>? Or what... you know what? Nevermind, this forum is a piece of shit and everything about it is just shit and fuck it fuck it in the ass I'm going to get more coffee
-
That post needs some TLC anyway since the markdown's degenerated since it was first posted...
Just when you think there's no way to fall further...
-
Would changed be a better euphemism?
-
No, I like it, leave it as far as I'm concerned.
I also like your balls. Nice colour.
-
-
They look like tennis balls.
Also, what edge conditions with backticks?
-
Also, what edge conditions with backticks?
Found one earlier over on meta.d:
blah blah <=
backticked with less than sign
blah blah <=
backticked with less than entity
In pub so couldn't be bothered to report it at the time.
-
oh, I generally just use trips for code blocks.
-
I'm using them for mono-spaced 'code like' emphasis. Or I was then. If I'm doing code blocks I generally use the triple backtick. (It's basically differentiating inline vs block commentary.)
-
Yeah, although it's funny that an <=
inline triple backtick
produces the same issue.
-
Fun fact:
This has five backticks around it ```` so I can put four backticks inside it.
That should render correctly, but Discourse is horrible. View the raw for this post.
-
I'm guessing it's something (or a few of them) not agreeing whether markdown, or HTML is the current markup at that point in the line.
-
I arseume it's pissforce's link tracking shit that fucks things up, but clicking on the "view raw" link in ben's post gives a "not found or private" page. If I then go to the URL and hit enter, the selfsame URL works, as does right-clicking and "open link in new tab"
Filed under: Link tracking is a barrier to link functionality
-
In other news, Discourse is a pile of diseased monkey poop, Pope is Catholic, bears shit in woods.
-
I thought it was the bear that was Catholic...
-
-
-
But you repeat myself...
-
There are two types of people, those than can extrapolate.
-
.. those that cant, those that thought this joke was in trinary and those...
-
...that make jokes about how many groups there are for any given criteria as a setup for a joke.
Unfortunately in the unofficial rules 4th edition, such humour is regurgitated and therefore entirely not allowed because it's probably been done in a sitcom somewhere.
-
Unfortunately in the unofficial rules 4th edition, such humour is regurgitated and therefore entirely not allowed because it's probably been done in a sitcom somewhere.
Oh. Have we moved back onto Mornington Crescent?
-
No, I was quoting from the super secret board here, where the 4th edition rules are posted.
-
Yeah, although it's funny that an <=
inline triple backtick
produces the same issue.I thought that was a gymnastics move...
Edit - oh wait, that's clearly more of a figure skating term.
-
.. those that cant, those that thought this joke was in trinary and those...
But to get back (kinda) on point, the two terms are completely mutually exclusive. The bear being Catholic has no bearing on where the Pope shits.
-
But to get back (kinda) on point, the two terms are completely mutually exclusive. The bear being Catholic has no bearing on where the Pope shits.
Of course it does. He certainly wouldn't be doing it in the woods. Otherwise the joke wouldn't work....