OpenWetWare:Dewikify/Demo
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.
- Item 1
<wikionly># Item 2</wikionly>
- Item 3
<nonwikionly># Item 4</nonwikionly>
- Item 5
In the above case, the tags surrounded the list markers. Look what happens if they are inside
- Item 1
- <wikionly>Item 2</wikionly>
- Item 3
- <nonwikionly>Item 4</nonwikionly>
- 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:
- Item 1
- <wikionly>Item 2</wikionly>
- Item 3
- <nonwikionly>Item 4</nonwikionly>
- 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.