I’ve always had trouble formatting my code, after I use a Numbered/Bulleted list - It just never formats for some reason. Like:
ONE.
TWO
COPY/PASTE CODE HERE AND FORMAT IT.
Or
Point.
Another point.
public ILogger Logger { get; set; }
public LoggingManager(ILogger logger)
{
Logger = logger;
}
Ahhh, in a perfect world where I could format ^
I want it so that, I could put my code, after the number/bullet, like:
N-
CODE HERE
If I do that, I either get out of the list’s sync, or it just won’t get formatted.
Is this how this thing works in the first place, or I just don’t know how? Of course, I didn’t see anything about this in the “Unity answers tutorial video”
This uses the backtick character to format the code, it only works for one line.
One
Two
//This is multiple //lines of code //but it's a pita to enter
This uses the code html tag and the br html tag at the end of lines. It requires quite a bit of manual work, since the markdown editor assumes every line you enter whilst in list mode is a new entry in the list. Which means cutting-and-pasting code is non-trivial.
I too have problems code in relation to lists. That is, if I attempt to format code directly after a list, the formatting does not work correctly. The solution I’ve found is to put a line of ‘normal’ text or a dotted line followed by an empty line between the list and the code .
One
Two
Three
#pragma strict
function Start() {
}
Without the line, the code would not format correctly.