Writing code in the forum
Notice: This thread is very old.
- David Grudl
- Nette Core | 8228
While posting and replying, you can use Texy syntax to enhance your messages.
Code phrases can be surrounded by `backtick quotes`.
Long code blocks write like on GitHub:
```php
function importFile($m)
{
list(, $file) = $m;
$level = substr_count($file, '/');
echo "$file\n";
}
```
or
```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule .* $0.php [L]
```
Javascript mark as js
, NEON as neon
, HTML as
html
, it supports Latte too:
```html
<ul>
{foreach $items as $item}
<li><a href="#">{$item}</a></li>
{/foreach}
</ul>
```
It is possible to use <?php
and ?>
delimiters
to indicate a PHP code:
<?php
function importFile($m)
{
list(, $file) = $m;
$level = substr_count($file, '/');
echo "$file\n";
}
?>