TxStyle · Textile Documentation

The Textile Markup Reference for Textpattern

Block code

The block code directive will add <pre> and <code> tags.

Input (editable)


More about: Block code

1) For long blocks of code with blank lines in between: Use the extended block directive bc.. and end the block with p. or with another block tag.

bc.. REM QuickBASIC example
INPUT "What is your name: ", UserName$
PRINT "Hello "; UserName$

  INPUT "How many stars do you want: ", NumStars
  Stars$ = STRING$(NumStars, "*")
  PRINT Stars$

    INPUT "Do you want more stars? ", Answer$
  LOOP UNTIL Answer$ <> ""

  Answer$ = LEFT$(Answer$, 1)
LOOP WHILE UCASE$(Answer$) = "Y"

PRINT "Goodbye "; UserName$

2) For inline snippets of code: Wrap with the at @ character:

A line with @code@

3) Note: The pre. tag is similar to the bc. tag, but no <code></code> tags are used within a <pre> block.

Paste code into the box above.

Further reading: Block code

PHP Textile v3.6.0