1% Code with syntax highlighting
3Here's what a delimited code block looks like:
5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
6 -- | Inefficient quicksort in haskell.
7 qsort :: (Enum a) => [a] -> [a]
9 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
10 qsort (filter (>= x) xs)
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13And here's how it looks after syntax highlighting:
15~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
16-- | Inefficient quicksort in haskell.
17qsort :: (Enum a) => [a] -> [a]
19qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
20 qsort (filter (>= x) xs)
21~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23Here's some python, with numbered lines (specify `{.python .numberLines}`):
25~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.python .numberLines}
28"""This is a Finite State Machine (FSM).
31def __init__(self, initial_state, memory=None):
33 """This creates the FSM. You set the initial state here. The "memory"
34 attribute is any object that you want to pass along to the action
35 functions. It is not used by the FSM. For parsing you would typically
36 pass a list to be used as a stack. """
38 # Map (input_symbol, current_state) --> (action, next_state).
39 self.state_transitions = {}
40 # Map (current_state) --> (action, next_state).
41 self.state_transitions_any = {}
42 self.default_transition = None
44~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list