Help:Editing

From ProgrammingExamples
Revision as of 15:47, 27 June 2010 by Griswolf (Talk | contribs)

Jump to: navigation, search

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.
  • To keep your indentation, but not show syntax highlighting, you may surround your code with pre tags:
    <pre>your code</pre>

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)