TuxScreen on SourceForge TuxScreen CVS search the Wiki
Browsing -> Wiki -> Users -> [JAWH]
edit, info, topics, orphans, hubs and nodes, or recent changes in the Wiki create a new user or login

Wiki is great fun. I've decided to fiddle around a bit and see what I come up with. If anyone cares to contribute, go right ahead.

For Reference:

Playground: Experiments with Wiki

I've just discovered Wiki and I'm curious about the interactions between various things. I'll be posing questions and attempting to find the answer. Wiki may not be worth all this trouble, but I'm having great fun :)

Basic Wiki


Can Wiki things like * be embedded in words? Let's see:

*bold*word, _italic_word

Nope. Only entire words can be formatted thusly.

*boldword*, italicword

Woopsie. My bolds didn't work. Must have been that naughty comma. Let's try that again

bold with no comma, and italics

But of course.

Horizontal Lines

Now let's see how many dashes you need to make a nifty horizontal rule (or, "line", as they say). The line up at the top is four dashes as shown in WikiFormat. Let's try less:






Okay, to create a line requires at least 3 hyphens (a.k.a. dashes). Let's see if we can make a line immediately after or before a paragraph (and by immediately, I mean without surrounding it with blank lines). I'll press Enter once, put three dashes, press Enter again, and type some more.

And here we are. That worked well, but what's this? The font's gone and changed! This text must be on the same paragraph as the line before, and for some reason that's fiddled with the HTML. Let's try that again, pressing Enter twice after the dashes.

That seems to have done it. Now let's see if I can change the font again simply by pressing Enter only once between paragraphs. Hullo? Testing, testing, one two three. Did I trick you? I did the italics myself :) However, we see that the text is still in the same font (and, in fact, still in the same paragraph), so no cigar.

Back to lines real quick: can we end a paragraph with one? Let's find out. Here come three dashes: ---

And three dashes are what we got. Now let's start a line with one. Three dashes begin the following paragraph, followed immediately by the text.

Same as before, apparently. A line, and a changed font.

What can we learn from this? Two things:

  1. If you only press Enter once, it will be discarded. Two newlines will be left intact.
  2. Following a newline with three hyphens gets you a horizontal rule, and if you don't follow that with at least two newlines, the following text will be in a different face. Presumably, Wiki treats two newlines as a <P> HTML tag, so if you only have one, it's passed straight to the HTML where it's meaningless, and so the following text ends up being outside a paragraph and thus rendered in the browser's default font.
That list there also shows that you can start a numeric list (and presumably a bulleted list as well) with only a single newline. This paragraph, preceded by the mandatory two newlines, also shows that doing so can fiddle with later paragraphs that are perfectly well-behaved.

All this talk about newlines leaves me wondering how more than two are treated. I'll press Enter five times and see what we get:

Just one blank line. So, any more than two newlines in a row are discarded.


Let's summarize what we've discovered thus far:

  • Wiki formatting like * and _ can't be stuck into the middle of words; they have to be around the entire word. Note that Wiki uses a rather liberal definition of "word" here; a "word" is pretty much any clump of non-whitespace (whitespace being spaces, tabs, and Enters) characters stuck together, including punctuation.
  • A line can be created by no less than 3 (Three) hyphens. While I didn't show it, you can make a line with more; the line immediately above is ten dashes.
  • A paragraph is officially terminated by 2 (Two) newlines (i.e., pressing Enter twice). However, some items like lines and lists can begin after only one newline. You can also begin a new paragraph after these constructs with a single newline; however, such a paragraph won't be converted to HTML the same way as other paragraphs are, and so you'll get an inconsistent appearance, not just in that paragraph but possibly also in the following one. When in doubt, press Enter twice.
  • Any newlines past two in a row will be ignored or discarded; I haven't yet decided which, but I'm thinking they're ignored. This is handy for visually splitting up chunks of text without causing similar splits in the final product.

A Foray into HTML

Now WikiFormat lists all the HTML codes that are supported, and I'll list them again just for the heck of it:


Let's see what these all do (suddenly I'm grinning hugely).

The H code must be headers, i.e. H1 through H6. Thusly,

This should be massive, being header one (H1),

and this should be smaller, being H2

and so forth down to H6.

Let me point out that I typed all that in a single line like so:

<H1>This should be massive, being header one (H1),</H1><H2>and this should be smaller, being H2</H2><H6>and so forth down to H6.</H6>

This text must have been passed straight to HTML, which typically does a line break after headers.

That example leads to another interesting discovery about Wiki: although it's not mentioned in WikiFormat, characters such as &lt; and &gt; (less than and greater than) are supported, which in turn means that I produced the earlier line by typing:

&lt;H1&gt;This should be massive, being header one (H1),&lt;/H1&gt;&lt;H2&gt;and this should be smaller, being H2&lt;/H2&gt;&lt;H6&gt;and so forth down to H6.&lt;/H6&gt;

And I'm not showing you how that line was produced or I'll be here all afternoon.

And here we are again. Yesterday I was on a different machine, running a crippled secure version of Netscape, and today I'm running Opera in all its glory, so I've noticed a few interesting things (what with being able to view source and all). First of all, the paragraphs regarding a changed font after lines and lists look fine here in Opera. Now that I can see the source, I'd conclude that my theory was correct, and newlines are indeed passed straight to the HTML. Also, excessive newlines are faithfully rendered as <P> tags, which the browser then faithfully ignores.

SourceForge Content of these pages are owned and copyrighted by the poster. SourceForge