From: David G. <go...@py...> - 2002-12-17 02:34:11
|
[David Abrahams] > When I try your workaround I still get a grammatically incorrect > apostrophe in the word "lists". The apostrophe was inserted to provide a word boundary, but has no other meaning as markup. In other words, it's not supposed to disappear, so it doesn't. > Would it break anything if you added the backslash to the list of > "certain punctuation characters"? That way, I could write > ``list``\s and get exactly the effect I want. [David Goodger] > Interesting idea. May work. I'll have to think it through. There > may be adverse side-effects due to the way backslash-escapes are > handled internally (they're converted to \x00 null bytes, which I've > always thought was a bit of a kludge, but it's worked thus far). I tried it, it does work, and I can't think of any nasty side-effects. This neat trick allows for arbitrary text after inline markup: Those bracketed expressions are Python ``list``\s. So I've checked it in. Available now from CVS or in 20 minutes from the snapshot. I don't see a good way to allow for arbitrary text *before* inline markup though. Is there a need? We can't use a simple backslash, since that says "the following is *not* markup". Perhaps a certain escape sequence can be defined as "disappearing", like "\-" or "\." or "\'". ("\ " has already been proposed as a way to indicate non-breaking space; not implemented yet. After looking this up, it seems the "disappearing" idea isn't new either: <http://docutils.sf.net/spec/notes.html#character-processing>.) -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |