Skip to content

\ignorespaces

yex.keyword.Ignorespaces(parser) #

Absorbs all space tokens which follow immediately.

Source code in yex/keyword/other.py
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
@yex.decorator.control(
    horizontal = True,
    vertical = True,
    math = True,
)
def Ignorespaces(parser):
    r"""
    Absorbs all space tokens which follow immediately.
    """
    while True:
        item = parser.next(level='expanding', on_eof='none')

        if not isinstance(item, yex.parse.Space):
            return item

        logger.debug(r"\ignorespaces: ignoring %s", item)