[Zope-Checkins] CVS: Zope/lib/python/docutils/readers - __init__.py:1.1.2.2 pep.py:1.1.2.2 standalone.py:1.1.2.2
Andreas Jung
andreas@andreas-jung.com
Sat, 25 Jan 2003 07:42:33 -0500
Update of /cvs-repository/Zope/lib/python/docutils/readers
In directory cvs.zope.org:/tmp/cvs-serv1819/readers
Modified Files:
Tag: ajung-restructuredtext-integration-branch
__init__.py pep.py standalone.py
Log Message:
docutils updated
=== Zope/lib/python/docutils/readers/__init__.py 1.1.2.1 => 1.1.2.2 ===
--- Zope/lib/python/docutils/readers/__init__.py:1.1.2.1 Tue Nov 5 04:03:58 2002
+++ Zope/lib/python/docutils/readers/__init__.py Sat Jan 25 07:42:30 2003
@@ -29,7 +29,7 @@
component_type = 'reader'
- def __init__(self, parser, parser_name):
+ def __init__(self, parser=None, parser_name='restructuredtext'):
"""
Initialize the Reader instance.
@@ -61,8 +61,7 @@
if not self.parser:
self.parser = parser
self.settings = settings
- # May modify self.parser, depending on input:
- self.input = self.source.read(self)
+ self.input = self.source.read()
self.parse()
return self.document
@@ -78,12 +77,7 @@
return document
-_reader_aliases = {
- 'rst': 'standalone',
- 'rest': 'standalone',
- 'restx': 'standalone',
- 'rtxt': 'standalone',
- 'restructuredtext': 'standalone'}
+_reader_aliases = {}
def get_reader_class(reader_name):
"""Return the Reader class from the `reader_name` module."""
=== Zope/lib/python/docutils/readers/pep.py 1.1.2.1 => 1.1.2.2 ===
--- Zope/lib/python/docutils/readers/pep.py:1.1.2.1 Tue Nov 5 04:03:58 2002
+++ Zope/lib/python/docutils/readers/pep.py Sat Jan 25 07:42:30 2003
@@ -20,6 +20,15 @@
from docutils.parsers import rst
+class Inliner(rst.states.Inliner):
+
+ """
+ Extend `rst.Inliner` to for local PEP references.
+ """
+
+ pep_url = rst.states.Inliner.pep_url_local
+
+
class Reader(standalone.Reader):
supported = ('pep',)
@@ -44,17 +53,10 @@
settings_default_overrides = {'pep_references': 1, 'rfc_references': 1}
- def __init__(self, parser, parser_name):
+ inliner_class = Inliner
+
+ def __init__(self, parser=None, parser_name=None):
"""`parser` should be ``None``."""
if parser is None:
- parser = rst.Parser(rfc2822=1, inliner=Inliner())
+ parser = rst.Parser(rfc2822=1, inliner=self.inliner_class())
standalone.Reader.__init__(self, parser, '')
-
-
-class Inliner(rst.states.Inliner):
-
- """
- Extend `rst.Inliner` to for local PEP references.
- """
-
- pep_url = rst.states.Inliner.pep_url_local
=== Zope/lib/python/docutils/readers/standalone.py 1.1.2.1 => 1.1.2.2 ===