highlight source code
There exist different ways for highlight sourcecode with pygments:
example:
result:
Info:
- With this method the code can contain
django template tags, except the sourcecode tag :)
- You didn't see the result in "markup preview"!
PyLucid has a creole markup macro for highlighting:
<<code ext=.FOO>>...<</code>>
(Where FOO is the fileextension of the sourcecode)
example:
<<code ext=.css>>
.xs {font-family:verdana,arial,helvetica,sans-serif;font-size: x-small}
.m {font-size: medium}
<</code>>
output is:
Important:
- The sourcecode should no contain syntax like
django template tags!
You can generate html code for copy&paste into page content with:
-
PyLucid Admin Menü/tools/hightlight code
E.g.: with Creole markup, put the generated html code into:
<<html>>...<</html>>
Info:
- With this method the code can contain
django template tags.