[Docstring-develop] DPS - possible bugs/features
Status: Pre-Alpha
Brought to you by:
goodger
|
From: Tony J I. (Tibs) <to...@ls...> - 2001-09-21 13:00:38
|
Hi - two problem reports and an upload.
First, I've uploaded a new pydps - it fixes some command line anomalies
(so one can now pretty print a text file!), and the HTML output now
makes a first pass at coping with references/footnotes/etc. (it doesn't
yet fold in targets, because that's plainly a job for the transformer
stage, and I don't have one of those yet!). Anyway, when run over
reStructuredText.txt, the result is now something approaching useful.
Now for the problems:
1. When trying to process reStructuredText.txt, the document produced
starts off like (output in "pretty mode")::
<document name="restructuredtext markup specification">
<title>
reStructuredText Markup Specification
This seems wrong to me - surely by the law of least surprise,
it should actually be:
<document name="restructuredtext markup specification">
<section>
<title>
reStructuredText Markup Specification
After all, the document starts with a title, and everywhere else
in the document, a title is a signal that one is starting a section.
(this isn't pure pedantry - it makes it a lot easier for me to
determine what is going on - I don't *particularly* want to special
case "document", and I *do* want to be able to cope well with
documents that *don't* start with a title...)
2. When processing the string module (yes, I know it isn't marked as
containing reST texts!), the text::
[1:2]
(or similar) is incorrectly identified as a link. Not a Good Thing.
Hmm - taking a text file containing::
This is a document with no title.
What happens if we have a Python range, like [1:2] or [a:b]
(or even [http:fred])?
and outputting it in "pretty mode" gives us::
<document>
<paragraph>
This is a document with no title.
<paragraph>
What happens if we have a Python range, like [1:2] or [
<link refuri="a:b">
a:b
]
(or even [
<link refuri="http:fred">
http:fred
])?
which is interesting.
Tibs
--
Tony J Ibbs (Tibs) http://www.tibsnjoan.co.uk/
Give a pedant an inch and they'll take 25.4mm
(once they've established you're talking a post-1959 inch, of course)
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)
|