On Sat, Jan 21, 2023 at 03:12:15PM +0100, Patrice Dumas wrote: > Please commit, I'll change the perl parser afterwards, it looks very > easy to implement. I have a commit related to source marks ready that I > can commit before or after changing the perl parser for this change, > actually.
Thanks for updating the perl parser. I was thinking the nesting warning for @ref could be removed now it is redundant: for @ref{aaa@ref{bbb}} there are two warnings: test.texi:6: warning: @ref should not appear in @ref test.texi:6: warning: @ref should not appear anywhere inside cross-reference However, this appears to be also an issue for all of the commands that are marked "contain_simple_text" in command_data.txt. Would it make sense to replace the nesting_context.xref counter with a nesting_context.simple_text counter and use it for all of the contain_simple_text commands? e.g. @settitle @xref{foo} is warned about, whereas @settitle @emph{@xref{foo}} is not. Perhaps we should also keep a stack of which commands incremented this counter so we can report the invalid nesting in an error message?