diff options
author | michele.simionato <devnull@localhost> | 2009-03-20 10:43:53 +0000 |
---|---|---|
committer | michele.simionato <devnull@localhost> | 2009-03-20 10:43:53 +0000 |
commit | b165b51cfe79a38e52070fee931fb1a2673a7f81 (patch) | |
tree | 7dd77fe17f882ffffb2ac650e66db461414dbf71 | |
parent | 57cd2e80cd26f03328374ecd973256e0b8b89b97 (diff) | |
download | micheles-b165b51cfe79a38e52070fee931fb1a2673a7f81.tar.gz |
Restored code-block directive, by stripping it in Artima posts
-rw-r--r-- | artima/post.py | 2 | ||||
-rw-r--r-- | artima/scheme/DarkTower.jpg | bin | 0 -> 110680 bytes | |||
-rw-r--r-- | artima/scheme/scheme19.ss | 8 |
3 files changed, 8 insertions, 2 deletions
diff --git a/artima/post.py b/artima/post.py index 44b519a..b8a5d71 100644 --- a/artima/post.py +++ b/artima/post.py @@ -8,6 +8,8 @@ from twill import commands as c IMAGE = re.compile('e::\s+([-+\w\.]+)') # figure/image def replace_image_links(txt): + "Remove code-block directives and relative images to make Artima happy" + txt = re.sub(r'.. code-block:: \w+', '::', txt) return IMAGE.sub(r'e:: http://www.phyast.pitt.edu/~micheles/scheme/\1', txt) if __name__ == '__main__': diff --git a/artima/scheme/DarkTower.jpg b/artima/scheme/DarkTower.jpg Binary files differnew file mode 100644 index 0000000..90c79a1 --- /dev/null +++ b/artima/scheme/DarkTower.jpg diff --git a/artima/scheme/scheme19.ss b/artima/scheme/scheme19.ss index 9db4d04..162984d 100644 --- a/artima/scheme/scheme19.ss +++ b/artima/scheme/scheme19.ss @@ -103,7 +103,9 @@ that at run time. In order to give an example of usage of the accumulator trick, let me define a conditional macro ``cond-`` which works like ``cond``, but -with less parenthesis:: +with less parenthesis: + +.. code-block:: scheme (cond- cond-1? return-1 @@ -111,7 +113,9 @@ with less parenthesis:: ... else return-default) -We want the code above to expand to:: +We want the code above to expand to: + +.. code-block:: scheme (cond (cond-1? return-1) |