adamzap/landslide — Issue #85: Can't work in Python2.6
Author: Gwill
Created: 2011-10-09 09:48:27+00:00
State: open

```cmd
D:\My Programs\Python\landslide\test>landslide -b slides.rst
Adding slides.rst (restructuredtext)
:4: (ERROR/3) Document or section may not begin with a transition.
Traceback (most recent call last):
File "D:\Programs\Python26\Scripts\landslide-script.py", line 8, in
load_entry_point('landslide==1.0.0', 'console_scripts', 'landslide')()
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\main.py", line 163, in main
run(input_file, options)
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\main.py", line 154, in run
generator.Generator(input_file, **options.__dict__).execute()
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\generator.py", line 198, in execute
self.write()
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\generator.py", line 484, in write
html = self.render()
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\generator.py", line 461, in render
slides = self.fetch_contents(self.source)
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\generator.py", line 242, in fetch_contents
inner_slides = re.split(r'', parser.parse(file_contents))
File "D:\Programs\Python26\lib\site-packages\landslide-1.0.0-py2.6.egg\landslide\parser.py", line 80, in parse
html = re.sub(pattern, replacement, html, 0, mode)
TypeError: sub() takes at most 4 arguments (5 given)
```

In Python2.6, re.sub() only has 4 arguments.