Sextile

What is Sextile?

Sextile is a simple and easy-to-use text format for editing weblog entries, and other text that needs to be converted to HTML. It was loosely inspired by Textile, and was written for personal use. It is available for everyone who's interested, though. (The download section currently has development versions.)

Features

1. Paragraphs and newlines. Multiple consecutive newlines separate paragraphs. In HTML, such text will be surrounded by <p></p> tags.
Single newlines are converted to <br>, unless they occur in a <pre> block.

2. Escape characters. These work much like e.g. \n in C and Python. Some are used to escape certain characters that normally should not be typed as-is in HTML; for example, to get the < character, write \<. (Ditto for > and &.)

There are other characters as well; \0 is replaced by nothing (which is more useful than it might seem, in certain cases), and \z at the end of a line prevents the newline there to be converted to a <br>. These two are "kludgy" escape characters though that should only be used if the normal Sextile behavior isn't what you want.

The backslash isn't often used in regular text, so it seemed a suitable choice. However, if you do need it, type \\, just like in C.

3. Style indicators. Inspired by Textile, but with a different "syntax". The indicators look like this: <* *>; the difference between begin and end (or "opening" and "closing", if you wish) markers prevents Sextile from trying to figure out where the style begins and where it ends, avoiding subtle bugs. Also, the tag-like indicators (<*foo*> rather than *foo*) are less likely to clash with regular text. (And I can still write things like *plonk* emoticon:wink2)

Here are the indicators:
<*strong*> (usually the same effect as "bold")
<_emphasized_> (usually the same as "italic")
<@code@>
<^superscript^>
<~subscript~>
<-<-strikeout->-> (may change)
<=underline=> (new in 0.5.1)

4. Headers. Borrowed from Textile, lines beginning with the letter h (lowercase), a digit 1-6, and a dot, are considered header lines. For example, the line h3. Foobar will display as:

Foobar

using <h3> tags. No surprises here.

5. Lists. These are the same as in Textile. Lines starting with * or # (and a space) are considered to be a list element, where # uses numbering and * does not:

* Harry
* Hermione
* Ron

translates to

  • Harry
  • Hermione
  • Ron

and

# Harry
# Cho
# Luna

to:

  1. Harry
  2. Cho
  3. Luna

6. Options

{to be added...}

7. Code blocks. To wrap something in <pre> tags, just put lines with "code:" and ":code" around it (and nothing else on those lines). For example:

code:
if x == 42:
    print "foo!"
:code

translates to:

if x == 42:
    print "foo!"

Also, read the mini-FAQ.

:::

Open issues:

<-1. Lists need to be added.->

2. Currently, escape characters and style indicators do work inside <pre> and <nomagic> blocks. Should they?

3. What about nested lists?

<-4. I'd like a syntax for code blocks, as an alternative to wrapping text in <pre> tags.->