Handle missing verbatim arguments and empty LaTeX matrices
This commit is contained in:
parent
bc25eeb06a
commit
3dfaed5041
1 changed files with 20 additions and 6 deletions
|
|
@ -460,12 +460,12 @@ class VerbatimArgsParser(MacroStandardArgsParser):
|
|||
if self.verbatim_arg_type == "verb-macro":
|
||||
# read the next nonwhitespace char. This is the delimiter of the
|
||||
# argument
|
||||
while w.s[pos].isspace():
|
||||
while pos < len(w.s) and w.s[pos].isspace():
|
||||
pos += 1
|
||||
if pos >= len(w.s):
|
||||
raise latexwalker.LatexWalkerParseError(
|
||||
s=w.s, pos=pos, msg=r"Missing argument to \verb command"
|
||||
)
|
||||
if pos >= len(w.s):
|
||||
raise latexwalker.LatexWalkerParseError(
|
||||
s=w.s, pos=pos, msg=r"Missing argument to \verb command"
|
||||
)
|
||||
verbdelimchar = w.s[pos]
|
||||
beginpos = pos + 1
|
||||
endpos = w.s.find(verbdelimchar, beginpos)
|
||||
|
|
|
|||
Loading…
Reference in a new issue