Meta:Guidelines: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 55: | Line 55: | ||
<code>Fixed format text for short, single-line code.</code> | <code>Fixed format text for short, single-line code.</code> | ||
<syntaxhighlight lang="text"> | |||
Long code, spans entire width of the page. | |||
Supports syntax highlighting of certain languages, like Python and HTML. | |||
Change the lang="" attribute to the correct language, e.g. lang="python" or lang="html5" | |||
Use lang="text" for non-supported languages. | |||
</syntaxhighlight> | |||
<br/> | |||
<syntaxhighlight lang="text" line style="height:15em; overflow:auto;"> | <syntaxhighlight lang="text" line style="height:15em; overflow:auto;"> | ||
You can also add line numbering. | |||
If your code is longer than, say, 50 lines, you can add a style attribute to introduce a scrollbar, as sampled here. For a 50-line cutoff, use style="height:50em; overflow:auto;". | If your code is longer than, say, 50 lines, you can add a style attribute to introduce a scrollbar, as sampled here. For a 50-line cutoff, use style="height:50em; overflow:auto;". | ||
| Line 63: | Line 72: | ||
I might fix that, but if it's really crucial to have an entire page full of code, you should probably give it a separate page. | I might fix that, but if it's really crucial to have an entire page full of code, you should probably give it a separate page. | ||
<!-- | <!-- Commence Bacon Ipsum --> | ||
Bacon ipsum dolor amet eiusmod in ribeye, flank duis swine drumstick shank kielbasa lorem pariatur shoulder in. Flank capicola dolore, tri-tip boudin fatback turkey. | |||
Ut esse in voluptate porchetta duis reprehenderit irure ullamco mollit tri-tip bresaola. Anim beef bresaola meatball t-bone spare ribs consequat ullamco. | |||
Shoulder sirloin fatback veniam dolore. Adipisicing sed tempor shank lorem, pariatur tri-tip et pork loin tail chuck meatloaf. | |||
Exercitation beef ribs short loin veniam pig, incididunt spare ribs. In ipsum biltong ex enim, boudin chuck andouille velit duis cow prosciutto elit. | |||
Duis tongue laborum veniam do meatloaf porchetta boudin minim aute in meatball ex turkey occaecat. Dolor kevin officia shoulder corned beef. | |||
Pork irure non, et nulla qui prosciutto boudin. Pancetta in turducken magna doner do dolor anim ad meatball prosciutto. Officia excepteur drumstick kielbasa ullamco, | |||
velit qui capicola aliquip. Cillum commodo nulla elit drumstick kevin turducken ut consectetur. Frankfurter in in boudin jerky. Do in anim ut sunt voluptate bresaola sed. | |||
Est leberkas nulla, incididunt biltong bacon boudin rump dolore dolore kielbasa proident kevin aliqua. | |||
</syntaxhighlight> | </syntaxhighlight> | ||