For example in tarfile.rst and logging.rst there are function definitions using *args and/or **kwargs like: .. function:: debug(msg[, *args[, **kwargs]]) The * and ** should be escaped IMO, so that they are not mistaken as reStructuredText markup, which confuses the syntax coloring of my Vim. While escaping * with a backslash works fine in normal text, it does not work in a function definition and the backslash appears in the HTML output.
Lars Gustäbel schrieb: > For example in tarfile.rst and logging.rst there are function > definitions using *args and/or **kwargs like: > > .. function:: debug(msg[, *args[, **kwargs]]) > > The * and ** should be escaped IMO, so that they are not mistaken as > reStructuredText markup, which confuses the syntax coloring of my Vim. > While escaping * with a backslash works fine in normal text, it does not > work in a function definition and the backslash appears in the HTML output. This was done deliberately since for C function descriptions .. cfunction:: PyObject *Py_DoSomething(PyObject *obj1, ...) it's a PITA to escape all the stars. The reST highlighting of Vim seems to be insufficient not only in this regard (inline markup can't span paragraphs); may I convince you to use a real editor like Emacs? :) *ducks* Fine, fine, I'll see if I can add backslash processing there. But I won't add backslashes for all of the existing definitions.
Oh, I thought Emacs was an operating system, I didn't know you could edit text files with it. You live and learn ;-) I suspected that this was intentional. If you make backslash escaping optional, that's fine with me.
Lars Gustäbel schrieb: > Lars Gustäbel added the comment: > > Oh, I thought Emacs was an operating system, I didn't know you could > edit text files with it. You live and learn ;-) > > I suspected that this was intentional. If you make backslash escaping > optional, that's fine with me. Okay, fixed in rev. 57712.
History
Date
User
Action
Args
2022-04-11 14:56:26
admin
set
github: 45400
2007-08-30 08:36:28
georg.brandl
set
status: open -> closedresolution: fixedmessages: +