projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5e5fce4
)
port to Python 3
author
Ralf Jung
<post@ralfj.de>
Sun, 29 Nov 2020 14:01:30 +0000
(15:01 +0100)
committer
Ralf Jung
<post@ralfj.de>
Sun, 29 Nov 2020 14:01:30 +0000
(15:01 +0100)
pycco-rs
patch
|
blob
|
history
diff --git
a/pycco-rs
b/pycco-rs
index c8843112582228dfe3edc52884bdddff16d8991d..3e6b29d213273d596dda4a5f03c40c24c07da9a1 100755
(executable)
--- a/
pycco-rs
+++ b/
pycco-rs
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
+#!/usr/bin/env python
3
# A little wrapper around pycco, to add Rust support.
import pycco, pycco_resources
from pygments import lexers, formatters
# A little wrapper around pycco, to add Rust support.
import pycco, pycco_resources
from pygments import lexers, formatters
@@
-32,13
+32,13
@@
def generate_documentation(*args, **kwargs):
generate_documentation_called = True
result = generate_documentation_orig(*args, **kwargs)
# now patch it
generate_documentation_called = True
result = generate_documentation_orig(*args, **kwargs)
# now patch it
- result = patch_html(result, '<link rel="stylesheet" href="pycco.css">',
- '<link rel="stylesheet" href="pycco_custom.css"><meta name="viewport" content="width=device-width">')
- result = patch_html(result,
'<title>',
'Rust-101: ')
+ result = patch_html(result,
b
'<link rel="stylesheet" href="pycco.css">',
+
b
'<link rel="stylesheet" href="pycco_custom.css"><meta name="viewport" content="width=device-width">')
+ result = patch_html(result,
b'<title>', b
'Rust-101: ')
## remove empty code blocks
## remove empty code blocks
- result = re.sub('''<div class='code'>
+ result = re.sub(
b
'''<div class='code'>
*<div class="highlight"><pre>(<span></span>)?</pre></div>
*<div class="highlight"><pre>(<span></span>)?</pre></div>
- *</div>''', '<!-- empty code block -->', result)
+ *</div>''',
b
'<!-- empty code block -->', result)
# done
return result
pycco.main.generate_documentation = generate_documentation
# done
return result
pycco.main.generate_documentation = generate_documentation