-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
markup in directive blocks #14
Comments
Taking As for whether we should be marking up directives? I guess that depends if the text is formatted or not. Tables, footnotes, and citations are certainly formatted. But I think directives would generally be undisplayed and not subject to reST rules. I'm tempted to just remove Any thoughts on this? |
Well, the problem is that e.g.
is a directive that includes markup, so you never know... Perhaps an easier(?), partial fix is to only highlight markup where both the start and the end-delimiters are present? Note that rst2html (and others, I guess) will implicitly close an opened markup delimiter where the end delimiter is missing, but will display a warning while doing so. |
OK, so some directives do actually need markup... but then others (like code) will go completely bonkers if it's used. I agree disabling markup within directives is a bad idea. It might be good to whitelist (or blacklist) the directives which do (or don't) accept markup, but maybe that's a somewhat bigger project for another day. In the meantime, I agree with you that terminating all highlight after end-string is the right move here. Unfortunately that comes up against my very limited vimL skills, but I'll have a go. |
https://github.com/python/cpython/blob/master/Doc/library/subprocess.rst#using-the-modsubprocess-module contains the following snippet:
Currently, vim-rst highlights as italic everything from the first star (first line) to after
*args*
. After skimming through the rst spec, I believe that the function signature is a separate element (http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#directives)so while it may not be completely clear whether the directive argument should be subject to markup (it may actually depend on the directive itself...), at least the markup should stop by the end of the element.
The text was updated successfully, but these errors were encountered: