@classmethod
def transform_lines(cls, transform, string, symbol_or_re, is_re=False,
    delimiters=None):
    """Split string into line tag lines and other sections; call
        transform callback on each tagged line.

        :returns: transformed string.

        :param transform: callback which receives argument ``tagged-line``.
        """
    if delimiters is None:
        delimiters = cls.line_delimiters
    result = []
    in_section = False
    for section in cls.tag_split(string, cls.adhoc_tag(symbol_or_re,
        delimiters, is_re), is_re):
        blob = section[1]
        if section[0]:
            in_section = not in_section
            blob = transform(blob)
        result.append(blob)
    string = ''.join(result)
    return string
