In such a case, even on the web, there is a script for the code to come out well clean. Is SyntaxHighlighter.
If you install this script, the code will come out clearly.
I will explain how to install the blogger this script.
First, go into the setting, please click the Edit in HTML.
It got to search for "<head>" by pressing the "Ctrl + F".
I put the following code below it. (I. Was me put a C #)
If you want to exchange the theme, please change in what you like the link below
http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/
It is a matter of adding another, but it may not be set by those who do not need.
It is part of the scroll bar is generated code is long. This is a little inconvenient to me.
So, to eliminate the scroll bar, text is long, so let's put the code that brings a wrap.
Press "Ctrl + F" again, </ b]]> ': if you search for skin> ", places like the figure below comes out.
Here is the part that css setting.
On top of this, is if you can put the following code.
/*--------Delete the vertical scroll in SyntaxHighlighter-----*/ .syntaxhighlighter { overflow-y: hidden!important; overflow-x: auto!important; } /*--------Word wrap in SyntaxHighlighter-----*/ .syntaxhighlighter .line { white-space: pre-wrap !important; /* make code wrap */
I installed such that it has done all this way.
If you want to add the type of other code, I can look at the following links.
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/css.html
The method used to create the text, is if it is possible to observe the rules as follows: when the insert code.
When there is a code like the following, and I'll wrap up the code in <Pre.....> </ Pre> as described above
// When the button is pressed
if (Input.GetMouseButtonUp(0) == true)
{
// If there is a particle
if (testParticle)
{
// If the particle is playing, you can erase You need to stop the playback
if (testParticle.isPlaying == true)
{
testParticle.Stop();
testParticle.Clear();
//Debug.Log("STOP");
}
// If it is not playing, playing
else
{
testParticle.Play();
//Debug.Log("PLAY");
}
}
}
It's made to come out as follows.
// When the button is pressed if (Input.GetMouseButtonUp(0) == true) { // If there is a particle if (testParticle) { // If the particle is playing, you can erase You need to stop the playback if (testParticle.isPlaying == true) { testParticle.Stop(); testParticle.Clear(); //Debug.Log("STOP"); } // If it is not playing, playing else { testParticle.Play(); //Debug.Log("PLAY"); } } }
댓글 없음:
댓글 쓰기