Help:Editing
From ProgrammingExamples
Editing Wiki Pages
Quick tricks
- To get syntax highlighting, surround your source code with
<source lang="language">...</source>
or (preferred)<syntaxhighlight lang="language">...</syntaxhighlight>
.
The list of supported languages is huge, and includes among many others c, cpp, java, perl, python. Note: lang attributes are in all lower case.
Dos and Don'ts for using the Programming Examples Wiki
- Do
- Create a 'dispatch page' for each new language that you add, put links to examples in that language on that page.
- Try to keep each example as short as possible... and no shorter!
- Try to demonstrate a single concept per example.
- Comment, comment, comment!
- Don't
- Do not treat the wiki as your own personal code dump. Things that are placed here should be useful for many people.
- Do not "hijack" code someone else has submitted by changing what it does. (Do improve it if you see a way)