diff options
| author | Tom Christie | 2012-09-08 20:23:32 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-09-08 20:23:32 +0100 | 
| commit | 5d9dfcd8ae10db37f0cca043d3b9977e27197487 (patch) | |
| tree | 2ecb637c6a8a52cb8ff986b43cf482822bd388c5 /mkdocs.py | |
| parent | 382b277dfc74f337d4d74ab100aec031041e42b7 (diff) | |
| download | django-rest-framework-5d9dfcd8ae10db37f0cca043d3b9977e27197487.tar.bz2 | |
Code highlighting in docs
Diffstat (limited to 'mkdocs.py')
| -rwxr-xr-x | mkdocs.py | 2 | 
1 files changed, 2 insertions, 0 deletions
| @@ -66,4 +66,6 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir):              os.makedirs(build_dir)          output = page.replace('{{ content }}', content).replace('{{ toc }}', toc).replace('{{ base_url }}', base_url).replace('{{ suffix }}', suffix).replace('{{ index }}', index)          output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output) +        output = re.sub(r'<pre><code>:::bash', r'<pre class="prettyprint lang-bsh">', output) +        output = re.sub(r'<pre>', r'<pre class="prettyprint lang-py">', output)          open(build_file, 'w').write(output.encode('utf-8')) | 
