From: Felix W. <Fel...@gm...> - 2004-10-30 20:12:24
|
David Goodger wrote: > Felix Wiemann wrote: > >> * I'd suggest adding built-in substitution definitions for "|--|" to >> en-dash and "|---|" to em-dash. > > 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> 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. Probably it's best to just require the document author to include his own substitution file(s). >> IMO the trailing space should be made omittable. > > We'd still need a leading space. I thought the leading space was optional; seems I got the current syntax wrong... 8-) > But this gave me an idea. In conjunction with a change to the > "unicode" directive, substitutions could become context-sensitive. We > could add a "trim" option to the "unicode" directive, as follows: > > .. |--| unicode:: U+02013 .. EN DASH > :trim: > .. |---| unicode:: U+02014 .. EM DASH > :trim: Looks nice. But what about multi-line unicode definitions? Recognize the option iff the last line is ':trim:'? Not too elegant but it could work. > 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? -- When replying to my email address, please ensure that the mail header contains 'Felix Wiemann'. http://www.ososo.de/ |