@staticmethod<EOL><INDENT>def _parse_whitespace_argument(source, name):<DEDENT>
<EOL>command_pattern = r'<STR_LIT>' + name + r'<STR_LIT>'<EOL>command_match = re.search(command_pattern, source)<EOL>if command_match is not None:<EOL><INDENT>source = source[command_match.end(<NUM_LIT:1>):]<EOL><DEDENT>pattern = r'<STR_LIT>'<EOL>match = re.search(pattern, source)<EOL>if match is None:<EOL><INDENT>message = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL>raise CommandParserError(message.format(name))<EOL><DEDENT>content = match.group('<STR_LIT:content>')<EOL>content.strip()<EOL>return content<EOL>
r"""Attempt to parse a single token on the first line of this source.

        This method is used for parsing whitespace-delimited arguments, like
        ``\input file``. The source should ideally contain `` file`` along
        with a newline character.

        >>> source = 'Line 1\n' r'\input test.tex' '\nLine 2'
        >>> LatexCommand._parse_whitespace_argument(source, 'input')
        'test.tex'

        Bracket delimited arguments (``\input{test.tex}``) are handled in
        the normal logic of `_parse_command`.