OpenWetWare:Dewikify/Demo

From OpenWetWare
Revision as of 16:24, 19 January 2006 by Austin J. Che (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This is a demo and a playground for some of the things that can be done with the dewikify script. Feel free to modify this page however you wish. You should edit this page to look at the source that generates this!

<wikionly>You are on the wiki! Go to the dewikified page. </wikionly>

<nonwikionly>You are on the static page! Go to the wiki page or edit it. </nonwikionly>


Lists work. Item 2 only appears on the wiki and item 4 only on the static page, but note that the numbering is always correct (no number skipping). This is because if the wikionly tag surrounds the line (nothing else is on the line, the entire line is removed including the extra newline.

  1. Item 1

<wikionly># Item 2</wikionly>

  1. Item 3

<nonwikionly># Item 4</nonwikionly>

  1. Item 5

In the above case, the tags surrounded the list markers. Look what happens if they are inside

  1. Item 1
  2. <wikionly>Item 2</wikionly>
  3. Item 3
  4. <nonwikionly>Item 4</nonwikionly>
  5. Item 5

Note that this is different from the previous as one of the list numbers is completely skipped. In this case, the wikionly tags aren't the only thing on the line so the newline remains and there is an empty list element. But because MediaWiki doesn't show the items for which there is no text, we skip a number. If we want to force the number with nothing next to it, add a non-blanking space:

  1. Item 1
  2. <wikionly>Item 2</wikionly> 
  3. Item 3
  4. <nonwikionly>Item 4</nonwikionly> 
  5. Item 5

<wikionly>'</wikionly>This text is bold on wiki and italic on static page<wikionly>'</wikionly>

In this example, we show how the wikionly tags are a kind of pre-processor, as an extra quote is added on the wiki only which converts it from italic to bold.