Cristi BALAN wrote:

> On Fri, 14 Jan 2005 00:00:56 +0900, Andreas Semt <as / computer-leipzig.de> wrote:
> 
>>Hello list!
>>
>>I use Instiki and Soks ("Soks rocks." TM by James Britt ;-)) as personal
>>and working Wiki apps. Both support the Textile Markup language - which
>>is a *really good* one, i think. However I don't understand why there
>>are _two_ tags for code formatting in Textile. From the Textile
>>reference (http://hobix.com/textile/)
>>--- snip ---
>>For example, long code blocks belong between pre and code tags. Please
>>also indent your code inside the tags to be sure that all Textile
>>processors out there will ignore the contents.
>>--- snap ---
>>
>>Why "pre" *and* "code"? If i use only one of them, the rendered wiki
>>page output is identical to the output where i used both of them.
>>So why?
>>
>>Greetings,
>>Andreas
>>
> 
> 
> I haven't tried what you asked but, I think they actually meant use
> pre _or_ code however you see fit, because pre and code do the same
> thing but one is an inline element and one is a block.
> 
> Example:
> <html>
> <body>
> 111<code>aaaa
> bbbb</code>222
> 
> 111<pre>aaaa
> bbbb</pre>222
> </body>
> </html>
> 
> 

Hello Cristi!

Yes ... "code" could is an inline tag and "pre" a block tag. However, 
the Textile Reference (http://hobix.com/textile/) shows following example:

--- snip ---
<pre>
<code>
   a.gsub!( /</, '' )
</code>
</pre>
--- snap ---

Both tags are used in conjunction. And *now* i know why!
The "pre" tag indents the whole content of the "code" tag. Without "pre" 
it's all at the beginning of the line, not indented. "pre" creates an 
indented block with formatted text, "code" just prints formatted text, 
nothing more.

Sorry for asking a stupid question.

Greetings,
Andreas