You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lines following a directive embedded in a definition list definition are not correctly highlighted. See screenshot:
The "yada yada yada" should not be highlighted as if it were part of the directive, as it is not at the indentation level to include it in the directive.
The text was updated successfully, but these errors were encountered:
This has been a longstanding problem (see #3, probably others), but fortunately we have found a way to fix it in literal blocks (see this example file).
The method has not yet been extended to code blocks and other but it should be use the same technique to fix this.
These are mostly notes to myself, but might be helpful to anyone interested.
Directives are going through the "old" methods, which rely on the rstExplicitMarkup = ^\s*\.\.\_s match to begin any directive. The disadvantage is that we then discard this leading whitespace in subsequent matches and are unable to align.
Some steps were taken to address this in .. code:: directives (rstCodeBlock), but were always somewhat incomplete and were never extended to more general directives (rstExDirective).
This was revised in the rstLiteralBlock region by tracking this whitespace (in a \z group, followed by a \@<= to do a back-match) and using it in the end match. One of the reasons we could tackle this separately is because it never relied on rstExplicitMarkup.
The technique ought to work in other groups, but would need to be applied in some way which either modifies, replaces, or abandons the rstExplicitMarkup match.
Some decisions need to be made here, but it should be possible to resolve all of these cases in the same way.
(Also worth noting that use of \@<= is generally discouraged because of bad performance, so something to watch out for if this is ever addressed.)
The lines following a directive embedded in a definition list definition are not correctly highlighted. See screenshot:
The "yada yada yada" should not be highlighted as if it were part of the directive, as it is not at the indentation level to include it in the directive.
The text was updated successfully, but these errors were encountered: