From: David G. <go...@py...> - 2004-11-01 04:39:32
|
[David Goodger] >> I don't know about inserting a set of predefined substitution >> definitions into the parser. But we could certainly include a set >> of substitution files in Docutils. Then the author could do: >> >> .. include:: <dashes.txt> [Felix Wiemann] > I'm not sure if the benefit is big enough enough to justify the > effort of adding such a feature and maintaining a set of 'standard' > substitution files. I think it may be justified, although it doesn't have to be done right away. I'm -1 on adding any built-in substitution definitions; a set of standard substitution definition files is the closest I'd agree to. > But what about multi-line unicode definitions? Recognize the option > iff the last line is ':trim:'? That's not an issue. It's taken care of by the directive parsing code. I added a "trim" option to the "unicode" directive; it doesn't do anything except set an attribute. Here's the result: $ quicktest.py <<EOF .. |x| unicode:: U+0041 U+0042 :trim: |x| EOF <document source="<stdin>"> <substitution_definition name="x" trim="1"> A B <paragraph> <substitution_reference refname="x"> x Note the 'trim="1"' in <substitution_definition ...>. >> And other characters can be used as markup delimiters, not just >> spaces. For example, hyphens can be used. > > I think that would be over-engineering. We don't *really* need it, > do we? Perhaps not right away, but I anticipate it may become necessary if the feature becomes popular. I'd be happy just to add it to the to-do list with a big "?", for now. -- David Goodger <http://python.net/~goodger> |