491 |
<code><code></code> tags like this: |
<code><code></code> tags like this: |
492 |
</p> |
</p> |
493 |
<code> |
<code> |
494 |
<code> |
<code lang="??language??"> |
495 |
|
|
496 |
??source-code?? |
??source-code?? |
497 |
|
|
498 |
</code> |
</code> |
499 |
</code> |
</code> |
500 |
<p> |
<p> |
501 |
Syntax highlighting is automatically generated for you, according to the |
Syntax highlighting is automatically generated for you That way you don't |
|
programming language or markup language used by you. That way you don't |
|
502 |
have to waste time on how to display source code nicely, and rather |
have to waste time on how to display source code nicely, and rather |
503 |
concentrate on the content of your article. Like with images, you can |
concentrate on the content of your article. |
504 |
|
You should provide the intended programming with <code>??language??</code>. |
505 |
|
Obviously it is exhausting to provide such a <code lang="none">lang</code> |
506 |
|
attribute with every single code sample, especially if you are just refering |
507 |
|
a single code token within your paragraphs. So you don't have to do that. |
508 |
|
If you omit the <code lang="none">lang</code> attribute, then our site's |
509 |
|
software will automatically use the language defined by your with one of |
510 |
|
the previous code blocks. |
511 |
|
</p> |
512 |
|
<p> |
513 |
|
Like with images, you can |
514 |
decide in which context the source code shall appear in your article, |
decide in which context the source code shall appear in your article, |
515 |
as described next. |
as described next. |
516 |
</p> |
</p> |
534 |
on its own between the paragraph blocks. Here is an example for the |
on its own between the paragraph blocks. Here is an example for the |
535 |
<a href="nksp.html">NKSP script language</a>. |
<a href="nksp.html">NKSP script language</a>. |
536 |
</p> |
</p> |
537 |
<code> |
<code lang="html"> |
538 |
<p> |
<p> |
539 |
Paragraph just before the source code block. |
Paragraph just before the source code block. |
540 |
</p> |
</p> |
541 |
<code> |
<code lang="nksp"> |
542 |
on init |
on init |
543 |
@foo := "A message" |
@foo := "A message" |
544 |
message(@foo) |
message(@foo) |