How to escape square brackets and highlight PHP code
Added by Jay Sheth about 14 years ago
Hello,
I'd like to convert a page like this ( http://svn.modxcms.com/docs/display/revolution20/Tag+Syntax ), which has square brackets, into a Redmine Wiki page. The problem is that Redmine does not display such text correctly, even inside "pre" or "code" tags.
Also, how do I highlight PHP code?
We are using Redmine 0.8.7.stable.3603 (MySQL)
Thank you.
Regards,
- Jay
Replies (3)
RE: How to escape square brackets and highlight PHP code
-
Added by Felix Schäfer about 14 years ago
Wikilinks in pre tags getting (falsely) converted to links is an issue that has been resolved, IIRC in 0.9, example:
[[somestuff]]
Regarding php highlighting, I'm not sure how far back the parser for it has been added to the syntax highlighter redmine uses, but you should be able to put stuff in < pre>< code class="php"> < /code>< /pre>
(obviously without the extra spaces), example:
<?php
$text = "Dies ist ein kleines Beispiel";
$text = str_replace("ist", "war", $text);
echo $text;
?>
RE: How to escape square brackets and highlight PHP code
-
Added by Jay Sheth about 14 years ago
Vielen Dank, Felix. I think I have to upgrade our installation to the latest version to solve both issues.
Mit freundlichen Gruessen,
- Jay
RE: How to escape square brackets and highlight PHP code
-
Added by Felix Schäfer about 14 years ago
Gern geschehen :-)