git.iko.soy/typeable/pandoc
on master help sign in
Moved code.txt -> code.text.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1228 788f1e2b-df1e-0410-8736-df70ead52e1b

commita2acc54014e0d9fd1ba121e1e7f3113f132ac60e authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 9 Feb 2008, 03:22 (19 years ago) parentd4e89c3
2 files changed+46−1
web/code.text+45 web/demos+1−1
web/code.textnew file+45
@@ -0,0 +1,45 @@
1+% Code with syntax highlighting
2+
3+Here's what a delimited code block looks like:
4+
5+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
6+ -- | Inefficient quicksort in haskell.
7+ qsort :: (Enum a) => [a] -> [a]
8+ qsort [] = []
9+ qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
10+ qsort (filter (>= x) xs)
11+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12+
13+And here's how it looks after syntax highlighting:
14+
15+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
16+-- | Inefficient quicksort in haskell.
17+qsort :: (Enum a) => [a] -> [a]
18+qsort [] = []
19+qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
20+ qsort (filter (>= x) xs)
21+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22+
23+Here's some python, with numbered lines (specify `{.python .numberLines}`):
24+
25+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.python .numberLines}
26+class FSM(object):
27+
28+"""This is a Finite State Machine (FSM).
29+"""
30+
31+def __init__(self, initial_state, memory=None):
32+
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. """
37+
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
43+ ...
44+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45+
web/demos+1−1
@@ -85,5 +85,5 @@ click on the name of the output file:
8585
868618. Syntax highlighting of delimited code blocks:
8787
88−@ pandoc @@code.txt@@ -s -o @@example18.html@@
88+@ pandoc @@code.text@@ -s -o @@example18.html@@
8989